Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
hayato24s committed Mar 9, 2024
1 parent 8a20e52 commit 25fbe4a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions module/auth/repository/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ func (r *impl) DeleteUsers(ctx context.Context, conds authport.DeleteUserConds)
var dbUsers []*model.User
tx = tx.Model(&dbUsers)

if conds.ID != nil {
tx.Where("id = ?", conds.ID.String())
}

if err := tx.Clauses(clause.Returning{Columns: []clause.Column{{Name: "id"}}}).
Update(`"deletedAt"`, time.Now()).
Error; err != nil {
Expand Down

0 comments on commit 25fbe4a

Please sign in to comment.