switch from 7 to 30 days of free trial

This commit is contained in:
MuslemRahimi 2024-08-04 15:43:02 +02:00
parent 6ee2289631
commit ea5b7771ec

View File

@ -13,7 +13,7 @@ admin_data = pb.admins.auth_with_password(pb_admin_email, pb_password)
now = datetime.now() now = datetime.now()
seven_days_ago = now - timedelta(days=7) one_month_ago = now - timedelta(days=30)
async def update_free_trial(): async def update_free_trial():
@ -22,8 +22,8 @@ async def update_free_trial():
for item in data: for item in data:
created_date = item.created created_date = item.created
# Check if the created date is more than 7 days ago # Check if the created date is more than N days ago
if created_date < seven_days_ago: if created_date < one_month_ago:
# Update the user record # Update the user record
pb.collection("users").update(item.id, { pb.collection("users").update(item.id, {
"tier": 'Free', "tier": 'Free',