Skip to content

Commit

Permalink
prep for allowing editing of existing users #414
Browse files Browse the repository at this point in the history
  • Loading branch information
mtthidoteu committed May 20, 2024
1 parent 1a263de commit 018ec31
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/wizarr-backend/wizarr_backend/helpers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,12 @@ def create_user(**kwargs) -> Users:

# Return the user
return user

def edit_user_expiration(user_id: int, expiry: datetime) -> Users:
"""Add a user expiration date to an existing user or edit existing expiration date"""
user = Users.get_by_id(user_id)
user.expires = expiry
user.save()
return user


0 comments on commit 018ec31

Please sign in to comment.