feat: add push notification settings to user profile and update related functionality
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m50s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m50s
This commit is contained in:
@@ -24,6 +24,7 @@ class User(BaseModel):
|
||||
token_version: int = 0
|
||||
timezone: str | None = None
|
||||
email_digest_enabled: bool = True
|
||||
push_notifications_enabled: bool = True
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, d: dict):
|
||||
@@ -49,6 +50,7 @@ class User(BaseModel):
|
||||
token_version=d.get('token_version', 0),
|
||||
timezone=d.get('timezone'),
|
||||
email_digest_enabled=d.get('email_digest_enabled', True),
|
||||
push_notifications_enabled=d.get('push_notifications_enabled', True),
|
||||
id=d.get('id'),
|
||||
created_at=d.get('created_at'),
|
||||
updated_at=d.get('updated_at')
|
||||
@@ -79,5 +81,6 @@ class User(BaseModel):
|
||||
'token_version': self.token_version,
|
||||
'timezone': self.timezone,
|
||||
'email_digest_enabled': self.email_digest_enabled,
|
||||
'push_notifications_enabled': self.push_notifications_enabled,
|
||||
})
|
||||
return base
|
||||
|
||||
Reference in New Issue
Block a user