diff --git a/src/main.rs b/src/main.rs index 768992d..6595c49 100644 --- a/src/main.rs +++ b/src/main.rs @@ -99,6 +99,9 @@ async fn friend(req: HttpRequest, body: String) -> HttpResponse { router::friend #[post("/api/live/guest")] async fn live_guest(req: HttpRequest, body: String) -> HttpResponse { router::live::guest(req, body) } +#[post("/api/live/mission")] +async fn live_mission(req: HttpRequest, body: String) -> HttpResponse { router::live::mission(req, body) } + #[post("/api/event")] async fn event(req: HttpRequest, body: String) -> HttpResponse { router::event::event(req, body) } @@ -201,6 +204,7 @@ async fn main() -> std::io::Result<()> { .service(login_bonus) .service(reward) .service(live_guest) + .service(live_mission) .service(live_clearrate) .service(live_start) .service(live_end) diff --git a/src/router/live.rs b/src/router/live.rs index cd4a8c1..bf14806 100644 --- a/src/router/live.rs +++ b/src/router/live.rs @@ -20,7 +20,6 @@ pub fn retire(_req: HttpRequest, _body: String) -> HttpResponse { } pub fn guest(_req: HttpRequest, _body: String) -> HttpResponse { - let resp = object!{ "code": 0, "server_time": global::timestamp(), @@ -29,6 +28,21 @@ pub fn guest(_req: HttpRequest, _body: String) -> HttpResponse { global::send(resp) } +pub fn mission(_req: HttpRequest, _body: String) -> HttpResponse { + //todo + let resp = object!{ + "code": 0, + "server_time": global::timestamp(), + "data": { + "score_ranking": "", + "combo_ranking": "", + "clear_count_ranking": "" + } + }; + global::send(resp) +} + + pub fn start(_req: HttpRequest, _body: String) -> HttpResponse { let resp = object!{ "code": 0,