mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
DRY-up and enforce kwargs for most events
For most events this makes the purpose of each argument clearer at the point the event is called. It's still worth having a function for each event type, as this abstracts knowledge of the event label. Using a schema approach will make adding new events easier. In the next commit we'll DRY-up the duplication in the tests as well.
This commit is contained in:
@@ -44,7 +44,7 @@ def archive_user(user_id):
|
||||
flash('User can’t be removed from a service - '
|
||||
'check all services have another team member with manage_settings')
|
||||
return redirect(url_for('main.user_information', user_id=user_id))
|
||||
create_archive_user_event(str(user_id), current_user.id)
|
||||
create_archive_user_event(user_id=str(user_id), archived_by_id=current_user.id)
|
||||
|
||||
return redirect(url_for('.user_information', user_id=user_id))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user