summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2025-04-17 16:11:34 +0200
committerSanto Cariotti <santo@dcariotti.me>2025-04-17 16:11:34 +0200
commit95da822f025b544f700729afc676ba0f3c981154 (patch)
tree89b07c3a4e8797e67cb08e8f6603b7e7eae3b0e1 /cmd
parent56c7e99b59a52f19598d33a46aea0516bd4d609f (diff)
Outcome for a game
Diffstat (limited to 'cmd')
-rw-r--r--cmd/api/main.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/api/main.go b/cmd/api/main.go
index 1ce83c9..4bd538a 100644
--- a/cmd/api/main.go
+++ b/cmd/api/main.go
@@ -22,6 +22,7 @@ func main() {
r.Handle("/play", middleware.AuthMiddleware(http.HandlerFunc(handlers.NewPlay))).Methods(http.MethodPost)
r.Handle("/play", middleware.AuthMiddleware(http.HandlerFunc(handlers.AllPlay))).Methods(http.MethodGet)
r.Handle("/play/{id}", middleware.AuthMiddleware(http.HandlerFunc(handlers.GetGameId))).Methods(http.MethodGet)
+ r.Handle("/play/{id}/end", middleware.AuthMiddleware(http.HandlerFunc(handlers.EndGame))).Methods(http.MethodPost)
r.Handle("/enter-game", middleware.AuthMiddleware(http.HandlerFunc(handlers.EnterGame))).Methods(http.MethodPost)
log.Info("Serving on :8080")