fix: move signin handler #181

This commit is contained in:
2024-10-03 23:23:16 +02:00
parent cc3747b226
commit cbf5b39294
4 changed files with 31 additions and 27 deletions

View File

@@ -9,8 +9,8 @@ import (
)
func handleWorkout(db *sql.DB, router *http.ServeMux, serverSettings *types.ServerSettings) {
router.Handle("/workout", auth(db, service.HandleWorkoutPage(db, serverSettings)))
router.Handle("POST /api/workout", auth(db, service.HandleWorkoutNewComp(db)))
router.Handle("GET /api/workout", auth(db, service.HandleWorkoutGetComp(db)))
router.Handle("DELETE /api/workout/{id}", auth(db, service.HandleWorkoutDeleteComp(db)))
router.Handle("/workout", authMiddleware(db, service.HandleWorkoutPage(db, serverSettings)))
router.Handle("POST /api/workout", authMiddleware(db, service.HandleWorkoutNewComp(db)))
router.Handle("GET /api/workout", authMiddleware(db, service.HandleWorkoutGetComp(db)))
router.Handle("DELETE /api/workout/{id}", authMiddleware(db, service.HandleWorkoutDeleteComp(db)))
}