fix
This commit is contained in:
parent
2c02ce1048
commit
124405a829
|
@ -76,5 +76,4 @@ async def get_profile(schema: RequestSchema) -> UserSchema:
|
|||
has_sub=has_sub,
|
||||
tab=schema.tab
|
||||
)
|
||||
print(profile)
|
||||
return profile
|
|
@ -141,6 +141,8 @@ class Database:
|
|||
async def update_subscription(self, user: UserSchema):
|
||||
async with self.AsyncSessionLocal() as session:
|
||||
try:
|
||||
await self.delete_expired_subscriptions()
|
||||
await self.delete_expired_tab_users()
|
||||
expiry_datetime = datetime.datetime.fromtimestamp(user.expiry, datetime.timezone.utc)
|
||||
if user.has_sub:
|
||||
subscription = await session.execute(select(Subscribe).where(Subscribe.discord == user.discord_id and Subscribe.nickname == user.username))
|
||||
|
|
Loading…
Reference in New Issue