slapid and player now links when registering
This commit is contained in:
@@ -17,6 +17,7 @@ import (
|
||||
"git.haelnorr.com/h/oslstats/internal/embedfs"
|
||||
"git.haelnorr.com/h/oslstats/internal/server"
|
||||
"git.haelnorr.com/h/oslstats/internal/store"
|
||||
"git.haelnorr.com/h/oslstats/pkg/slapshotapi"
|
||||
)
|
||||
|
||||
// Initializes and runs the server
|
||||
@@ -47,8 +48,15 @@ func run(ctx context.Context, logger *hlog.Logger, cfg *config.Config) error {
|
||||
return errors.Wrap(err, "discord.NewAPIClient")
|
||||
}
|
||||
|
||||
// Setup Slapshot API
|
||||
logger.Debug().Msg("Setting up Slapshot API client")
|
||||
slapAPI, err := slapshotapi.NewSlapAPIClient(cfg.Slapshot)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "slapshotapi.NewSlapAPIClient")
|
||||
}
|
||||
|
||||
logger.Debug().Msg("Setting up HTTP server")
|
||||
httpServer, err := server.Setup(staticFS, cfg, logger, conn, store, discordAPI)
|
||||
httpServer, err := server.Setup(staticFS, cfg, logger, conn, store, discordAPI, slapAPI)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "setupHttpServer")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user