mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Add /api/location endpoint
This commit is contained in:
parent
1106ee89ba
commit
f913f38b70
3 changed files with 10 additions and 0 deletions
|
@ -112,6 +112,7 @@ fn api_req(req: HttpRequest, body: String) -> HttpResponse {
|
||||||
"/api/home/announcement" => router::user::announcement(req),
|
"/api/home/announcement" => router::user::announcement(req),
|
||||||
"/api/shop" => router::shop::shop(req),
|
"/api/shop" => router::shop::shop(req),
|
||||||
"/api/exchange" => router::exchange::exchange(req),
|
"/api/exchange" => router::exchange::exchange(req),
|
||||||
|
"/api/location" => router::location::location(req),
|
||||||
_ => unhandled(req, body)
|
_ => unhandled(req, body)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,3 +25,4 @@ pub mod clear_rate;
|
||||||
pub mod exchange;
|
pub mod exchange;
|
||||||
pub mod items;
|
pub mod items;
|
||||||
pub mod databases;
|
pub mod databases;
|
||||||
|
pub mod location;
|
||||||
|
|
8
src/router/location.rs
Normal file
8
src/router/location.rs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
use json::{object, JsonValue};
|
||||||
|
use actix_web::{HttpRequest};
|
||||||
|
|
||||||
|
pub fn location(_req: HttpRequest) -> Option<JsonValue> {
|
||||||
|
Some(object!{
|
||||||
|
"master_location_ids": []
|
||||||
|
})
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue