diff options
Diffstat (limited to 'cmd/api/main.go')
-rw-r--r-- | cmd/api/main.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/api/main.go b/cmd/api/main.go index 1fcd4d1..1ce83c9 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -20,6 +20,8 @@ func main() { r.HandleFunc("/auth/register", handlers.RegisterUser).Methods(http.MethodPost) r.HandleFunc("/auth/login", handlers.LoginUser).Methods(http.MethodPost) 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("/enter-game", middleware.AuthMiddleware(http.HandlerFunc(handlers.EnterGame))).Methods(http.MethodPost) log.Info("Serving on :8080") |