temporary fix for stats route
This commit is contained in:
parent
566d8b0879
commit
e71d11cd4d
@ -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…
Reference in New Issue
Block a user