diff --git a/pokerogue-server.go b/pokerogue-server.go index a051539..1cdc918 100644 --- a/pokerogue-server.go +++ b/pokerogue-server.go @@ -54,10 +54,8 @@ func main() { } func backend(ctx *fasthttp.RequestCtx) { - path := string(ctx.Path()) - - if strings.HasPrefix(path, "/api") { - switch path { + if strings.HasPrefix(string(ctx.Path()), "/api") { + switch string(ctx.Path()) { case "/api/account/info": api.HandleAccountInfo(ctx) case "/api/account/register":