mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Implement dummy /api/live/mission
This commit is contained in:
parent
3fe1401046
commit
fc9d627005
2 changed files with 19 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue