Browse Source

placed REST api behind /api/v0/

Stephen McQuay 3 years ago
parent
commit
b5cac7c02a
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      control.go

+ 6
- 6
control.go View File

@@ -56,12 +56,12 @@ func NewController(conf Config, mprof, pprof string) *http.ServeMux {
56 56
 	sm := http.NewServeMux()
57 57
 	sm.Handle("/", JsonHandler(c.Index))
58 58
 	sm.Handle("/ws/", websocket.Handler(c.AddPlayer))
59
-	sm.Handle("/game/start/", JsonHandler(c.StartGame))
60
-	sm.Handle("/game/list/", JsonHandler(c.ListGames))
61
-	sm.Handle("/game/stats/", JsonHandler(c.GameStats))
62
-	sm.Handle("/game/bw/", JsonHandler(c.BW))
63
-	sm.Handle("/game/stop/", JsonHandler(c.StopGame))
64
-	sm.HandleFunc("/fuck/shit/up/", c.KillServer)
59
+	sm.Handle("/api/v0/game/start/", JsonHandler(c.StartGame))
60
+	sm.Handle("/api/v0/game/list/", JsonHandler(c.ListGames))
61
+	sm.Handle("/api/v0/game/stats/", JsonHandler(c.GameStats))
62
+	sm.Handle("/api/v0/game/bw/", JsonHandler(c.BW))
63
+	sm.Handle("/api/v0/game/stop/", JsonHandler(c.StopGame))
64
+	sm.HandleFunc("/api/v0/fsu/", c.KillServer)
65 65
 
66 66
 	return sm
67 67
 }

Loading…
Cancel
Save