fix(backend): don't crash if redis isn't set, use tx in CreateMember
This commit is contained in:
parent
3b64ba33f6
commit
d58208f5ac
3 changed files with 23 additions and 2 deletions
|
@ -94,7 +94,7 @@ func (db *DB) CreateMember(ctx context.Context, tx pgx.Tx, userID xid.ID, name s
|
|||
return m, errors.Wrap(err, "building sql")
|
||||
}
|
||||
|
||||
err = pgxscan.Get(ctx, db, &m, sql, args...)
|
||||
err = pgxscan.Get(ctx, tx, &m, sql, args...)
|
||||
if err != nil {
|
||||
pge := &pgconn.PgError{}
|
||||
if errors.As(err, &pge) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue