Skip to content

Commit

Permalink
Fixes to email change cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nygrenh committed May 24, 2024
1 parent f0eefb6 commit 4399c1e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class RecentlyChangedUserDetailsController < Api::V8::BaseController
def index
return respond_forbidden unless current_user.administrator?
RecentlyChangedUserDetail.deleted.where('created_at < ?', DateTime.now - 1.week).update(email: nil)
RecentlyChangedUserDetail.email_changed.where('created_at < ?', DateTime.now - 1.month).delete_all
render json: { changes: RecentlyChangedUserDetail.all }
end
end
Expand Down

0 comments on commit 4399c1e

Please sign in to comment.