Add user sessions and login
This isn't quite perfect, but gets much of the hard work done.
This commit is contained in:
parent
e311464b51
commit
486c148bf7
28 changed files with 1701 additions and 30 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue