Browse Source

temporary fix for stats route

master
Stephen McQuay 7 years ago
parent
commit
e71d11cd4d
  1. 5
      control.go

5
control.go

@ -358,10 +358,11 @@ func (c *Controller) getGameId(path string) (string, error) {
var err error
trimmed := strings.Trim(path, "/")
fullPath := strings.Split(trimmed, "/")
if len(fullPath) != 3 {
log.Printf("%+v: %d", fullPath, len(fullPath))
if len(fullPath) != 5 {
return "", errors.New("improperly formed url")
}
key := fullPath[2]
key := fullPath[len(fullPath)-1]
return key, err
}

Loading…
Cancel
Save