From 52ad8256d2a1b0ee61f294e8fb639b26e73b260c Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Tue, 14 Mar 2023 11:03:37 +0800 Subject: [PATCH] refactor: move submission_status_detail.php into api folder --- web/app/controllers/subdomain/api/route.php | 2 ++ .../api/submission}/submission_status_details.php | 0 web/app/route.php | 1 - web/js/uoj.js | 4 ++-- 4 files changed, 4 insertions(+), 3 deletions(-) rename web/app/controllers/{ => subdomain/api/submission}/submission_status_details.php (100%) diff --git a/web/app/controllers/subdomain/api/route.php b/web/app/controllers/subdomain/api/route.php index ae169a7..e4bde77 100644 --- a/web/app/controllers/subdomain/api/route.php +++ b/web/app/controllers/subdomain/api/route.php @@ -7,6 +7,8 @@ call_user_func(function () { // to prevent variable scope leak ], function () { Route::post("/api/remote_judge/custom_account_validator", '/subdomain/api/remote_judge/custom_account_validator.php'); + + Route::any('/api/submission/submission_status_details', '/subdomain/api/submission/submission_status_details.php'); } ); }); diff --git a/web/app/controllers/submission_status_details.php b/web/app/controllers/subdomain/api/submission/submission_status_details.php similarity index 100% rename from web/app/controllers/submission_status_details.php rename to web/app/controllers/subdomain/api/submission/submission_status_details.php diff --git a/web/app/route.php b/web/app/route.php index 421cc33..b0a8a9e 100644 --- a/web/app/route.php +++ b/web/app/route.php @@ -54,7 +54,6 @@ Route::group( Route::any('/submissions', '/submissions_list.php'); Route::any('/submission/{id}', '/submission.php'); - Route::any('/submission-status-details', '/submission_status_details.php'); Route::any('/hacks', '/hack_list.php'); Route::any('/hack/{id}', '/hack.php'); diff --git a/web/js/uoj.js b/web/js/uoj.js index ced468a..4b3aef5 100644 --- a/web/js/uoj.js +++ b/web/js/uoj.js @@ -403,8 +403,8 @@ function update_judgement_status_details(id) { $(document).ready(function() { function update() { - $.get("/submission-status-details", { - get: update_judgement_status_list + $.get("/api/submission/submission_status_details", { + get: update_judgement_status_list, }, function(data) { for (var i = 0; i < update_judgement_status_list.length; i++) {