fix
This commit is contained in:
parent
ecc16a198d
commit
821e5a65ab
4 changed files with 20 additions and 6 deletions
|
|
@ -14,4 +14,4 @@ class AuthToken(Base):
|
|||
revoked: Mapped[bool] = mapped_column(default=False, nullable=False)
|
||||
revoked_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
|
||||
def is_valid(self) -> bool:
|
||||
return not self.revoked and self.expires_at > datetime.utcnow()
|
||||
return not self.revoked and self.expires_at > datetime.utcnow()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue