fix: restructure handler yet again #181
Some checks failed
Build Docker Image / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2024-09-18 21:28:44 +02:00
parent f184e261ee
commit ab3b255b92
3 changed files with 3 additions and 17 deletions

View File

@@ -21,6 +21,7 @@ func GetHandler(db *sql.DB) http.Handler {
router.Handle("/workout", auth(db, workoutUi(db)))
router.Handle("/api/workout", auth(db, workoutApi(db)))
// Needed a second time with trailing slash, otherwise either /api/workout or /api/workout/{id} does not match
router.Handle("/api/workout/", auth(db, workoutApi(db)))
return middleware.Logging(