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 6f22e066ab
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 45s
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 46s
fix: restructure handler.go #181
2024-09-15 12:58:06 +02:00

16 lines
451 B
Go

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