Redo card syncing

This commit is contained in:
Ethan O'Brien
2026-09-02 15:06:17 -05:00
parent 59193d92f4
commit 2d9ea66ee3
7 changed files with 387 additions and 575 deletions
+4 -4
View File
@@ -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
}
}