Add /api/location endpoint

This commit is contained in:
Ethan O'Brien 2024-06-03 17:20:22 -05:00
parent 1106ee89ba
commit f913f38b70
3 changed files with 10 additions and 0 deletions

View file

@ -112,6 +112,7 @@ fn api_req(req: HttpRequest, body: String) -> HttpResponse {
"/api/home/announcement" => router::user::announcement(req),
"/api/shop" => router::shop::shop(req),
"/api/exchange" => router::exchange::exchange(req),
"/api/location" => router::location::location(req),
_ => unhandled(req, body)
}
};

View file

@ -25,3 +25,4 @@ pub mod clear_rate;
pub mod exchange;
pub mod items;
pub mod databases;
pub mod location;

8
src/router/location.rs Normal file
View 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": []
})
}