From b5cac7c02ac2b6a4c07dccd3f947e7981e594a49 Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Wed, 26 Aug 2015 22:18:48 -0700 Subject: [PATCH] placed REST api behind /api/v0/ --- control.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/control.go b/control.go index 379e749..1b8ec76 100644 --- a/control.go +++ b/control.go @@ -56,12 +56,12 @@ func NewController(conf Config, mprof, pprof string) *http.ServeMux { sm := http.NewServeMux() sm.Handle("/", JsonHandler(c.Index)) sm.Handle("/ws/", websocket.Handler(c.AddPlayer)) - sm.Handle("/game/start/", JsonHandler(c.StartGame)) - sm.Handle("/game/list/", JsonHandler(c.ListGames)) - sm.Handle("/game/stats/", JsonHandler(c.GameStats)) - sm.Handle("/game/bw/", JsonHandler(c.BW)) - sm.Handle("/game/stop/", JsonHandler(c.StopGame)) - sm.HandleFunc("/fuck/shit/up/", c.KillServer) + sm.Handle("/api/v0/game/start/", JsonHandler(c.StartGame)) + sm.Handle("/api/v0/game/list/", JsonHandler(c.ListGames)) + sm.Handle("/api/v0/game/stats/", JsonHandler(c.GameStats)) + sm.Handle("/api/v0/game/bw/", JsonHandler(c.BW)) + sm.Handle("/api/v0/game/stop/", JsonHandler(c.StopGame)) + sm.HandleFunc("/api/v0/fsu/", c.KillServer) return sm }