temporary fix for stats route

This commit is contained in:
Stephen McQuay 2015-08-30 23:25:26 -07:00
parent 566d8b0879
commit e71d11cd4d

View File

@ -358,10 +358,11 @@ func (c *Controller) getGameId(path string) (string, error) {
var err error var err error
trimmed := strings.Trim(path, "/") trimmed := strings.Trim(path, "/")
fullPath := strings.Split(trimmed, "/") 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") return "", errors.New("improperly formed url")
} }
key := fullPath[2] key := fullPath[len(fullPath)-1]
return key, err return key, err
} }