slapid and player now links when registering

This commit is contained in:
2026-02-17 18:33:22 +11:00
parent 35eb2e695a
commit c16db1bf60
11 changed files with 137 additions and 28 deletions

View File

@@ -15,6 +15,7 @@ import (
"git.haelnorr.com/h/oslstats/internal/permissions"
"git.haelnorr.com/h/oslstats/internal/rbac"
"git.haelnorr.com/h/oslstats/internal/store"
"git.haelnorr.com/h/oslstats/pkg/slapshotapi"
)
func addRoutes(
@@ -25,6 +26,7 @@ func addRoutes(
auth *hwsauth.Authenticator[*db.User, bun.Tx],
store *store.Store,
discordAPI *discord.APIClient,
slapAPI *slapshotapi.SlapAPI,
perms *rbac.Checker,
) error {
// Create the routes
@@ -55,7 +57,7 @@ func addRoutes(
{
Path: "/register",
Methods: []hws.Method{hws.MethodGET, hws.MethodPOST},
Handler: auth.LogoutReq(handlers.Register(s, auth, conn, cfg, store)),
Handler: auth.LogoutReq(handlers.Register(s, auth, conn, slapAPI, cfg, store)),
},
{
Path: "/logout",