games inits itself

This commit is contained in:
bel
2024-12-14 21:37:57 -07:00
parent f40fdd60da
commit 306295ba1c
3 changed files with 27 additions and 24 deletions

View File

@@ -31,12 +31,16 @@ func run(ctx context.Context) error {
if err != nil {
return err
}
games, err := NewGames(ctx, db)
if err != nil {
return err
}
S := &S{
ctx: ctx,
limiter: rate.NewLimiter(10, 10),
config: config,
games: NewGames(db),
games: games,
}
s := &http.Server{