This repository has been archived on 2025-08-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
web-app-template/handler/workout.go
Tim Wundenberg cbf5b39294
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 47s
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 51s
fix: move signin handler #181
2024-10-03 23:24:58 +02:00

17 lines
561 B
Go

package handler
import (
"me-fit/service"
"me-fit/types"
"database/sql"
"net/http"
)
func handleWorkout(db *sql.DB, router *http.ServeMux, serverSettings *types.ServerSettings) {
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)))
}