account page stubbed: link to etsy sign up

This commit is contained in:
2025-12-29 06:06:13 -07:00
parent 61f9afb39c
commit c9100383e4
35 changed files with 1326 additions and 158 deletions
+2 -22
View File
@@ -31,30 +31,10 @@ type (
}
)
func NewStore(ctx context.Context) (*Store, error) {
pool, err := newPool(ctx)
if err != nil {
return nil, err
}
func NewStore(db *pgxpool.Pool) *Store {
return &Store{
db: pool,
}, nil
}
func newPool(ctx context.Context) (*pgxpool.Pool, error) {
pool, err := pgxpool.New(ctx, "postgres://app_client:app_password@localhost:5432/inventory_2?sslmode=disable")
if err != nil {
return nil, fmt.Errorf("failed to create database client: %w", err)
db: db,
}
conn, err := pool.Acquire(ctx)
if err != nil {
return nil, fmt.Errorf("failed to create a database connection: %w", err)
}
conn.Release()
return pool, nil
}
func (db *Store) WithContext(ctx context.Context) *StoreWithContext {