mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-07-12 00:32:20 +08:00
Add ability to pull login bonus list
This commit is contained in:
@@ -218,6 +218,7 @@ pub async fn request(req: HttpRequest, body: String) -> HttpResponse {
|
|||||||
"/api/webui/serverInfo" => webui::server_info(req),
|
"/api/webui/serverInfo" => webui::server_info(req),
|
||||||
"/api/webui/listCards" => webui::get_card_info(req),
|
"/api/webui/listCards" => webui::get_card_info(req),
|
||||||
"/api/webui/listMusic" => webui::get_music_info(req),
|
"/api/webui/listMusic" => webui::get_music_info(req),
|
||||||
|
"/api/webui/listLoginBonus" => webui::list_login_bonus(req),
|
||||||
_ => api_req(req, body).await
|
_ => api_req(req, body).await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,3 +323,13 @@ pub fn get_music_info(req: HttpRequest) -> HttpResponse {
|
|||||||
//.insert_header(("Access-Control-Allow-Origin", FRONTEND_DOMAIN))
|
//.insert_header(("Access-Control-Allow-Origin", FRONTEND_DOMAIN))
|
||||||
.body(json::stringify(resp))
|
.body(json::stringify(resp))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn list_login_bonus(_req: HttpRequest) -> HttpResponse {
|
||||||
|
|
||||||
|
let resp = json::parse(&include_file!("src/router/webui/login_bonus.json")).unwrap();
|
||||||
|
|
||||||
|
HttpResponse::Ok()
|
||||||
|
.content_type(ContentType::json())
|
||||||
|
//.insert_header(("Access-Control-Allow-Origin", FRONTEND_DOMAIN))
|
||||||
|
.body(json::stringify(resp))
|
||||||
|
}
|
||||||
|
|||||||
1262
src/router/webui/login_bonus.json
Normal file
1262
src/router/webui/login_bonus.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user