FitTrackee/fittrackee/oauth2/clean.py
2023-10-02 18:57:58 +02:00

10 lines
229 B
Python

from fittrackee.utils import clean
def clean_tokens(days: int) -> int:
sql = """
DELETE FROM oauth2_token
WHERE oauth2_token.issued_at + oauth2_token.expires_in < :limit;
"""
return clean(sql, days)