mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Implement dummy /api/live/ranking
This commit is contained in:
parent
fc9d627005
commit
d56dbbe952
2 changed files with 16 additions and 0 deletions
|
@ -102,6 +102,9 @@ async fn live_guest(req: HttpRequest, body: String) -> HttpResponse { router::li
|
||||||
#[post("/api/live/mission")]
|
#[post("/api/live/mission")]
|
||||||
async fn live_mission(req: HttpRequest, body: String) -> HttpResponse { router::live::mission(req, body) }
|
async fn live_mission(req: HttpRequest, body: String) -> HttpResponse { router::live::mission(req, body) }
|
||||||
|
|
||||||
|
#[post("/api/live/ranking")]
|
||||||
|
async fn live_ranking(req: HttpRequest, body: String) -> HttpResponse { router::live::ranking(req, body) }
|
||||||
|
|
||||||
#[post("/api/event")]
|
#[post("/api/event")]
|
||||||
async fn event(req: HttpRequest, body: String) -> HttpResponse { router::event::event(req, body) }
|
async fn event(req: HttpRequest, body: String) -> HttpResponse { router::event::event(req, body) }
|
||||||
|
|
||||||
|
@ -205,6 +208,7 @@ async fn main() -> std::io::Result<()> {
|
||||||
.service(reward)
|
.service(reward)
|
||||||
.service(live_guest)
|
.service(live_guest)
|
||||||
.service(live_mission)
|
.service(live_mission)
|
||||||
|
.service(live_ranking)
|
||||||
.service(live_clearrate)
|
.service(live_clearrate)
|
||||||
.service(live_start)
|
.service(live_start)
|
||||||
.service(live_end)
|
.service(live_end)
|
||||||
|
|
|
@ -42,6 +42,18 @@ pub fn mission(_req: HttpRequest, _body: String) -> HttpResponse {
|
||||||
global::send(resp)
|
global::send(resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// /api/live/ranking
|
||||||
|
pub fn ranking(_req: HttpRequest, _body: String) -> HttpResponse {
|
||||||
|
//todo
|
||||||
|
let resp = object!{
|
||||||
|
"code": 0,
|
||||||
|
"server_time": global::timestamp(),
|
||||||
|
"data": {
|
||||||
|
"ranking_list": []
|
||||||
|
}
|
||||||
|
};
|
||||||
|
global::send(resp)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn start(_req: HttpRequest, _body: String) -> HttpResponse {
|
pub fn start(_req: HttpRequest, _body: String) -> HttpResponse {
|
||||||
let resp = object!{
|
let resp = object!{
|
||||||
|
|
Loading…
Add table
Reference in a new issue