ADD: team site and player/usermanagement is working

This commit is contained in:
hwinkel
2025-11-22 14:51:53 +01:00
parent 846a922a41
commit 139a99d96e
13 changed files with 229 additions and 111 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"log"
"os"
"volleyball/internal/auth"
"volleyball/internal/database"
@@ -63,12 +64,16 @@ func main() {
player.CreatePlayer(c, db.GetDB())
})
api.PUT("/players/:id", func(c *gin.Context) {
log.Println("PUT /players/:id called", c.Params)
player.UpdatePlayer(c, db.GetDB())
})
api.DELETE("/players/:id", func(c *gin.Context) {
player.DeletePlayer(c, db.GetDB())
// c.JSON(http.StatusOK, gin.H{"message": "Player deleted successfully"})
})
api.GET("/teams", func(c *gin.Context) {
})
port := os.Getenv("PORT")
if port == "" {