mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-10-11 17:14:30 +08:00
Redo card syncing
This commit is contained in:
+4
-4
@@ -190,7 +190,7 @@ fn not_found(req: &HttpRequest) -> HttpResponse {
|
||||
global::send(rv, 0, req)
|
||||
}
|
||||
|
||||
// Fallback for paths no actix route matched. Game endpoints live in each module's routes()
|
||||
// Fallback
|
||||
async fn api_req(req: HttpRequest, body: String) -> HttpResponse {
|
||||
let args = crate::get_args();
|
||||
if args.hidden && (req.path().starts_with("/api/webui/") || !(req.path().starts_with("/api") || req.path().starts_with("/v1.0"))) {
|
||||
@@ -225,8 +225,8 @@ pub async fn request(req: HttpRequest, body: String) -> HttpResponse {
|
||||
"/api/webui/grantPermission" => webui::grant_permission(req, body),
|
||||
"/api/webui/revokePermission" => webui::revoke_permission(req, body),
|
||||
"/api/webui/removeArcadeMachine" => webui::remove_arcade_machine(req, body),
|
||||
"/api/webui/bindArcadeCard" => webui::bind_arcade_card(req, body),
|
||||
"/api/webui/unbindArcadeCard" => webui::unbind_arcade_card(req, body),
|
||||
"/api/webui/linkNesicaCard" => webui::link_nesica_card(req, body),
|
||||
"/api/webui/unlinkNesicaCard" => webui::unlink_nesica_card(req, body),
|
||||
_ => api_req(req, body).await
|
||||
}
|
||||
} else {
|
||||
@@ -247,7 +247,7 @@ pub async fn request(req: HttpRequest, body: String) -> HttpResponse {
|
||||
"/api/webui/custom3dmvLimits" => webui::custom_3dmv_limits(req),
|
||||
"/api/webui/myScopes" => webui::my_scopes(req),
|
||||
"/api/webui/listArcadeMachines" => webui::list_arcade_machines(req),
|
||||
"/api/webui/listArcadeCards" => webui::list_arcade_cards(req),
|
||||
"/api/webui/listNesicaCards" => webui::list_nesica_cards(req),
|
||||
_ => api_req(req, body).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user