Skip to content

Commit

Permalink
switch from 7 to 30 days of free trial
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Aug 4, 2024
1 parent 6ee2289 commit ea5b777
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/cron_pocketbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


now = datetime.now()
seven_days_ago = now - timedelta(days=7)
one_month_ago = now - timedelta(days=30)


async def update_free_trial():
Expand All @@ -22,8 +22,8 @@ async def update_free_trial():

for item in data:
created_date = item.created
# Check if the created date is more than 7 days ago
if created_date < seven_days_ago:
# Check if the created date is more than N days ago
if created_date < one_month_ago:
# Update the user record
pb.collection("users").update(item.id, {
"tier": 'Free',
Expand Down

0 comments on commit ea5b777

Please sign in to comment.