finish breadcumbs and categories
This commit is contained in:
@ -33,8 +33,8 @@ func setupHTTP(cfg config.HTTP, srv xhttp.Server, log *slog.Logger) *http.Server
|
||||
|
||||
router.Use(mux.CORSMethodMiddleware(router))
|
||||
router.Use(middlewareLogger(log))
|
||||
router.HandleFunc("/updatedesc", coursesAPI.UdpateDescription).Methods(http.MethodPost)
|
||||
coursesRouter := router.PathPrefix("/courses").Subrouter()
|
||||
// router.HandleFunc("/updatedesc", coursesAPI.UdpateDescription).Methods(http.MethodPost)
|
||||
coursesRouter := router.PathPrefix("/courses").Subrouter().StrictSlash(true)
|
||||
coursesRouter.HandleFunc("/", coursesAPI.List).Methods(http.MethodGet)
|
||||
coursesListLearningOnlyPath := makePathTemplate(xhttp.LearningTypePathParam)
|
||||
coursesRouter.HandleFunc(coursesListLearningOnlyPath, coursesAPI.List).Methods(http.MethodGet)
|
||||
|
||||
Reference in New Issue
Block a user