Skip to content

Commit 73da6bc

Browse files
committed
more fixing
1 parent 6b25ec3 commit 73da6bc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

permissions.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ var (
1414
var Permissions = map[string]PermissionKey{}
1515

1616
func Route(r *http.ServeMux, method, path string, permission PermissionKey, handler func(http.ResponseWriter, *http.Request)) {
17-
Permissions[method+path] = permission
18-
r.HandleFunc(method+" "+path, handler)
17+
endpoint := method + " " + path
18+
Permissions[endpoint] = permission
19+
r.HandleFunc(endpoint, handler)
1920
}
2021

2122
var HandlerGetUserPublicKey func(userID string) (*rsa.PublicKey, error)

0 commit comments

Comments
 (0)