Skip to content

Commit

Permalink
Fix AdminGradingController Swagger paths
Browse files Browse the repository at this point in the history
  • Loading branch information
RichDom2185 committed Sep 3, 2023
1 parent 659fd4a commit bf4db19
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/cadet_web/admin_controllers/admin_grading_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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: []}])

Expand All @@ -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: []}])

Expand All @@ -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: []}])

Expand All @@ -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")

Expand All @@ -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")

Expand All @@ -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")

Expand Down

0 comments on commit bf4db19

Please sign in to comment.