Skip to content

Commit

Permalink
refactor: Update remaining generations to 20 in get_generations function
Browse files Browse the repository at this point in the history
  • Loading branch information
Arghya721 committed Aug 18, 2024
1 parent 48149fc commit 53234d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,11 +594,11 @@ def get_generations(token_info: dict = Depends(verify_google_token)):
# create a new document for the user with the remaining generations
user_generations_ref.set({
'google_user_id': token_info['sub'],
'remaining_generations': 30,
'remaining_generations': 20,
'created_at': google_firestore.SERVER_TIMESTAMP,
'updated_at': google_firestore.SERVER_TIMESTAMP,
})
return 30
return 20

def update_generations_left(token_info: dict = Depends(verify_google_token), generations_left: int = 30):
"""Update the number of generations left for the user."""
Expand Down

0 comments on commit 53234d6

Please sign in to comment.