Feat: settings repo
This commit is contained in:
		| @@ -17,6 +17,7 @@ type AllRepos interface { | ||||
| 	PlayersRepo | ||||
| 	SessionsRepo | ||||
| 	WordCardsRepo | ||||
| 	SettingsRepo | ||||
| 	InitTx(ctx context.Context) (context.Context, *sqlx.Tx, error) | ||||
| } | ||||
|  | ||||
| @@ -32,6 +33,11 @@ func NewRepoProvider(pathToDB string) *RepoProvider { | ||||
| 		slog.Error("Unable to connect to database", "error", err) | ||||
| 		os.Exit(1) | ||||
| 	} | ||||
| 	_, err = db.Exec("PRAGMA foreign_keys = ON;") | ||||
| 	if err != nil { | ||||
| 		slog.Error("Unable to enable foreign keys", "error", err) | ||||
| 		os.Exit(1) | ||||
| 	} | ||||
| 	slog.Info("Successfully connected to database") | ||||
| 	rp := &RepoProvider{ | ||||
| 		DB:       db, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder