mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
This commit is contained in:
7
rc_microtransactions/src/robocraft/mod.rs
Normal file
7
rc_microtransactions/src/robocraft/mod.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
mod store;
|
||||
|
||||
pub fn stage() -> rocket::fairing::AdHoc {
|
||||
rocket::fairing::AdHoc::on_ignite("JSON", |rocket| async {
|
||||
rocket.attach(store::stage())
|
||||
})
|
||||
}
|
||||
17
rc_microtransactions/src/robocraft/store.rs
Normal file
17
rc_microtransactions/src/robocraft/store.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
use rocket::{post, routes, serde::json::{json, Value}};
|
||||
|
||||
#[post("/robopay/store")]
|
||||
pub fn robopay_store() -> Value {
|
||||
// TODO authentication (Authorization header is "Robocraft {JWT token from auth}")
|
||||
json!({
|
||||
"response": {
|
||||
"data": []
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn stage() -> rocket::fairing::AdHoc {
|
||||
rocket::fairing::AdHoc::on_ignite("Robocraft store info", |rocket| async {
|
||||
rocket.mount("/", routes![robopay_store])
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user