Use transactions to set the communication status changes
Not doing it yet, but soon we'll do log entries for them.
This commit is contained in:
parent
040ab106b4
commit
a95e44cf42
8 changed files with 67 additions and 20 deletions
|
|
@ -13,10 +13,10 @@ import (
|
|||
func UserPrivilegesDeleteByUserID(ctx context.Context, txn bob.Tx, id string) error {
|
||||
statement := table.User.DELETE().
|
||||
WHERE(table.User.ID.EQ(postgres.String(id)))
|
||||
return db.ExecuteNoneTx(ctx, txn, statement)
|
||||
return db.ExecuteNoneTxBob(ctx, txn, statement)
|
||||
}
|
||||
func UserPrivilegeInsert(ctx context.Context, txn bob.Tx, m *model.UserPrivilege) error {
|
||||
statement := table.UserPrivilege.INSERT(table.UserPrivilege.MutableColumns).
|
||||
MODEL(m)
|
||||
return db.ExecuteNoneTx(ctx, txn, statement)
|
||||
return db.ExecuteNoneTxBob(ctx, txn, statement)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue