Browse Source

temporary fix for stats route

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) {
358 358
 	var err error
359 359
 	trimmed := strings.Trim(path, "/")
360 360
 	fullPath := strings.Split(trimmed, "/")
361
-	if len(fullPath) != 3 {
361
+	log.Printf("%+v: %d", fullPath, len(fullPath))
362
+	if len(fullPath) != 5 {
362 363
 		return "", errors.New("improperly formed url")
363 364
 	}
364
-	key := fullPath[2]
365
+	key := fullPath[len(fullPath)-1]
365 366
 	return key, err
366 367
 }
367 368
 

Loading…
Cancel
Save