slapid and player now links when registering

This commit is contained in:
2026-02-17 18:33:22 +11:00
parent 9362448f22
commit 42282d05b1
11 changed files with 137 additions and 28 deletions

View File

@@ -15,6 +15,7 @@ import (
"git.haelnorr.com/h/oslstats/internal/handlers"
"git.haelnorr.com/h/oslstats/internal/rbac"
"git.haelnorr.com/h/oslstats/internal/store"
"git.haelnorr.com/h/oslstats/pkg/slapshotapi"
)
func Setup(
@@ -24,6 +25,7 @@ func Setup(
conn *db.DB,
store *store.Store,
discordAPI *discord.APIClient,
slapAPI *slapshotapi.SlapAPI,
) (server *hws.Server, err error) {
if staticFS == nil {
return nil, errors.New("No filesystem provided")
@@ -67,7 +69,7 @@ func Setup(
return nil, errors.Wrap(err, "rbac.NewChecker")
}
err = addRoutes(httpServer, &fs, cfg, conn, auth, store, discordAPI, perms)
err = addRoutes(httpServer, &fs, cfg, conn, auth, store, discordAPI, slapAPI, perms)
if err != nil {
return nil, errors.Wrap(err, "addRoutes")
}