Add user sessions and login

This isn't quite perfect, but gets much of the hard work done.
This commit is contained in:
Eli Ribble 2025-11-05 17:15:33 +00:00
parent e311464b51
commit 486c148bf7
No known key found for this signature in database
28 changed files with 1701 additions and 30 deletions

View file

@ -24,6 +24,7 @@ var embedMigrations embed.FS
type postgres struct {
BobDB bob.DB
PGXPool *pgxpool.Pool
}
var (
@ -96,7 +97,7 @@ func initializeDatabase(ctx context.Context, uri string) error {
pgOnce.Do(func() {
db, e := pgxpool.New(ctx, uri)
bobDB := bob.NewDB(stdlib.OpenDBFromPool(db))
PGInstance = &postgres{bobDB}
PGInstance = &postgres{bobDB, db}
err = e
})
if err != nil {