@@ -112,13 +112,13 @@ Visit http://localhost:8080 after starting the server.
112112 io := sock .Mount (r )
113113 defer io .Close ()
114114
115- // GM -protected route (serves the SPA index behind basic auth)
115+ // Host -protected routes (serves the SPA index behind basic auth)
116116 if cfg .GMUser != "" && cfg .GMPass != "" {
117117 auth := gin .BasicAuth (gin.Accounts {cfg .GMUser : cfg .GMPass })
118- r .GET ("/gm " , auth , func (c * gin.Context ) {
118+ r .GET ("/host " , auth , func (c * gin.Context ) {
119119 staticserver .Handler ().ServeHTTP (c .Writer , c .Request )
120120 })
121- r .GET ("/gm /*any" , auth , func (c * gin.Context ) {
121+ r .GET ("/host /*any" , auth , func (c * gin.Context ) {
122122 staticserver .Handler ().ServeHTTP (c .Writer , c .Request )
123123 })
124124 }
@@ -134,7 +134,7 @@ Visit http://localhost:8080 after starting the server.
134134 if cfg .GMUser != "" && cfg .GMPass != "" {
135135 auth := gin .BasicAuth (gin.Accounts {cfg .GMUser : cfg .GMPass })
136136 type createReq struct { Config game.SessionConfig `json:"config"` }
137- r .POST ("/api/gm /create" , auth , func (c * gin.Context ) {
137+ r .POST ("/api/host /create" , auth , func (c * gin.Context ) {
138138 var req createReq
139139 if err := c .BindJSON (& req ); err != nil {
140140 c .JSON (http .StatusBadRequest , gin.H {"error" : "invalid_config" })
0 commit comments