Stub out payment store web server #9, implement/fix last of login process #8

This commit is contained in:
NGnius (Graham) committed 2025-03-02 09:52:44 -05:00
1 parent 7e31f6fe1d
commit f004ca8565
15 files changed
+123 -21

No files matched your search

@@ -0,0 +1,7 @@
mod store;
pub fn stage() -> rocket::fairing::AdHoc {
rocket::fairing::AdHoc::on_ignite("JSON", |rocket| async {
rocket.attach(store::stage())
})
}
@@ -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])
})
}