Merge branch 'main' into reports
This commit is contained in:
commit
76a8b30fe2
13 changed files with 355 additions and 263 deletions
|
@ -404,3 +404,16 @@ func (db *DB) UndoDeleteUser(ctx context.Context, id xid.ID) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (db *DB) ForceDeleteUser(ctx context.Context, id xid.ID) error {
|
||||
sql, args, err := sq.Delete("users").Where("id = ?", id).ToSql()
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "building sql")
|
||||
}
|
||||
|
||||
_, err = db.Exec(ctx, sql, args...)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "executing query")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue