Browse Source

temporary fix for stats route

master
Stephen McQuay 4 years ago
parent
commit
e71d11cd4d
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      control.go

+ 3
- 2
control.go View File

@@ -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