Add getGame and listGames endpoints, client methods and initial components
This commit is contained in:
parent
ff455414f8
commit
08ab312f92
8 changed files with 136 additions and 8 deletions
|
@ -41,6 +41,7 @@ func (w *WebServer) RegisterRoutes(api *api.API) {
|
|||
apiRouter.HandleFunc("/users", api.Secured(api.CreateUser)).Methods("POST")
|
||||
apiRouter.HandleFunc("/games", api.Secured(api.CreateGame)).Methods("POST")
|
||||
apiRouter.HandleFunc("/games", api.Secured(api.ListGames)).Methods("GET")
|
||||
apiRouter.HandleFunc("/games/{id:[0-9]+}", api.Secured(api.GetGame)).Methods("GET")
|
||||
|
||||
staticFSSub, _ := fs.Sub(staticFS, "static")
|
||||
staticFSHandler := StaticFSHandler{http.FileServer(http.FS(staticFSSub))}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue