From e71d11cd4df7d55b821767a6a4dd0d3228dde6be Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Sun, 30 Aug 2015 23:25:26 -0700 Subject: [PATCH] temporary fix for stats route --- control.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/control.go b/control.go index f7607c8..0a70831 100644 --- a/control.go +++ b/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 }