mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
add interface and url for problem rejudge
This commit is contained in:
parent
92a67285d4
commit
e29349b665
@ -2,7 +2,7 @@ from django.conf.urls import url
|
||||
|
||||
from ..views.admin import (ContestProblemAPI, ProblemAPI, TestCaseAPI, MakeContestProblemPublicAPIView,
|
||||
CompileSPJAPI, AddContestProblemAPI, ExportProblemAPI, ImportProblemAPI,
|
||||
FPSProblemImport)
|
||||
FPSProblemImport,ProblemRejudgeAPI)
|
||||
|
||||
urlpatterns = [
|
||||
url(r"^test_case/?$", TestCaseAPI.as_view(), name="test_case_api"),
|
||||
@ -14,4 +14,5 @@ urlpatterns = [
|
||||
url(r"^export_problem/?$", ExportProblemAPI.as_view(), name="export_problem_api"),
|
||||
url(r"^import_problem/?$", ImportProblemAPI.as_view(), name="import_problem_api"),
|
||||
url(r"^import_fps/?$", FPSProblemImport.as_view(), name="fps_problem_api"),
|
||||
url(r"^problem/rejudge?$", ProblemRejudgeAPI.as_view(), name="problem_rejudge_api"),
|
||||
]
|
||||
|
||||
@ -697,3 +697,10 @@ class FPSProblemImport(CSRFExemptAPIView):
|
||||
problem_data["test_case_id"] = test_case_id
|
||||
self._create_problem(problem_data, request.user)
|
||||
return self.success({"import_count": len(problems)})
|
||||
|
||||
|
||||
class ProblemRejudgeAPI(APIView):
|
||||
@super_admin_required
|
||||
def get(self, request):
|
||||
# ... do something
|
||||
return self.success()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user