This commit is contained in:
yuetsh
2024-07-02 22:38:57 +08:00
parent 6356406b01
commit b397c4add2
2 changed files with 3 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ class CommentAPI(APIView):
@super_admin_required
def get(self, request):
comments = Comment.objects.select_related("problem").exclude(content="")
problem_id = request.GET.get("problem_id")
problem_id = request.GET.get("problem")
if problem_id:
try:
# 这里如果题目不可见,也需要显示该题目的评论

View File

@@ -16,5 +16,5 @@ urlpatterns = [
path("api/admin/", include("utils.urls")),
path("api/", include("message.urls.oj")),
path("api/", include("comment.urls.oj")),
path("api/admin", include("comment.urls.admin")),
path("api/admin/", include("comment.urls.admin")),
]