Skip to content

Commit

Permalink
Fix AdminCoursesController Swagger paths
Browse files Browse the repository at this point in the history
Also added FIXMEs for missing entries.
  • Loading branch information
RichDom2185 committed Sep 3, 2023
1 parent 7acbdfd commit 659fd4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cadet_web/admin_controllers/admin_courses_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ defmodule CadetWeb.AdminCoursesController do
end

swagger_path :update_course_config do
put("/v2/courses/{course_id}/admin/config")
put("/courses/{course_id}/admin/config")

summary("Updates the course configuration for the specified course")

Expand All @@ -117,7 +117,7 @@ defmodule CadetWeb.AdminCoursesController do
end

swagger_path :update_assessment_configs do
put("/v2/courses/{course_id}/admin/config/assessment_configs")
put("/courses/{course_id}/admin/config/assessment_configs")

summary("Updates the assessment configuration for the specified course")

Expand Down
2 changes: 2 additions & 0 deletions lib/cadet_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ defmodule CadetWeb.Router do
post("/stories/:storyid", AdminStoriesController, :update)

put("/config", AdminCoursesController, :update_course_config)
# FIXME: Missing corresponding Swagger path entry
get("/config/assessment_configs", AdminCoursesController, :get_assessment_configs)
put("/config/assessment_configs", AdminCoursesController, :update_assessment_configs)

# FIXME: Missing corresponding Swagger path entry
delete(
"/config/assessment_config/:assessment_config_id",
AdminCoursesController,
Expand Down

0 comments on commit 659fd4a

Please sign in to comment.