From bf4db19db57ba8dec8870887b35f299ee4a6bee0 Mon Sep 17 00:00:00 2001 From: Richard Dominick <34370238+RichDom2185@users.noreply.github.com> Date: Sun, 3 Sep 2023 21:52:17 +0800 Subject: [PATCH] Fix AdminGradingController Swagger paths --- .../admin_controllers/admin_grading_controller.ex | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/cadet_web/admin_controllers/admin_grading_controller.ex b/lib/cadet_web/admin_controllers/admin_grading_controller.ex index 4a0fe38d8..9658b531a 100644 --- a/lib/cadet_web/admin_controllers/admin_grading_controller.ex +++ b/lib/cadet_web/admin_controllers/admin_grading_controller.ex @@ -118,7 +118,7 @@ defmodule CadetWeb.AdminGradingController do end swagger_path :index do - get("/admin/grading") + get("/courses/{course_id}/admin/grading") summary("Get a list of all submissions with current user as the grader") @@ -141,7 +141,7 @@ defmodule CadetWeb.AdminGradingController do end swagger_path :unsubmit do - post("/admin/grading/{submissionId}/unsubmit") + post("/courses/{course_id}/admin/grading/{submissionId}/unsubmit") summary("Unsubmit submission. Can only be done by the Avenger of a student") security([%{JWT: []}]) @@ -156,7 +156,7 @@ defmodule CadetWeb.AdminGradingController do end swagger_path :autograde_submission do - post("/admin/grading/{submissionId}/autograde") + post("/courses/{course_id}/admin/grading/{submissionId}/autograde") summary("Force re-autograding of an entire submission") security([%{JWT: []}]) @@ -171,7 +171,7 @@ defmodule CadetWeb.AdminGradingController do end swagger_path :autograde_answer do - post("/admin/grading/{submissionId}/{questionId}/autograde") + post("/courses/{course_id}/admin/grading/{submissionId}/{questionId}/autograde") summary("Force re-autograding of a question in a submission") security([%{JWT: []}]) @@ -187,7 +187,7 @@ defmodule CadetWeb.AdminGradingController do end swagger_path :show do - get("/admin/grading/{submissionId}") + get("/courses/{course_id}/admin/grading/{submissionId}") summary("Get information about a specific submission to be graded") @@ -206,7 +206,7 @@ defmodule CadetWeb.AdminGradingController do end swagger_path :update do - post("/admin/grading/{submissionId}/{questionId}") + post("/courses/{course_id}/admin/grading/{submissionId}/{questionId}") summary("Update marks given to the answer of a particular question in a submission") @@ -228,7 +228,7 @@ defmodule CadetWeb.AdminGradingController do end swagger_path :grading_summary do - get("/admin/grading/summary") + get("/courses/{course_id}/admin/grading/summary") summary("Receives a summary of grading items done by this grader")