added activity view
This commit is contained in:
17
FitnessSync/scratch/check_tokens.py
Normal file
17
FitnessSync/scratch/check_tokens.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from src.models.api_token import APIToken
|
||||
from src.services.postgresql_manager import PostgreSQLManager
|
||||
import os
|
||||
|
||||
print(f"CWD: {os.getcwd()}")
|
||||
try:
|
||||
db = PostgreSQLManager().get_db_session()
|
||||
with db as session:
|
||||
token = session.query(APIToken).filter_by(token_type="fitbit").first()
|
||||
if token:
|
||||
print(f"Token Found: ID={token.id}")
|
||||
print(f"Access Token: {'[PRESENT]' if token.access_token else '[MISSING]'}")
|
||||
print(f"Refresh Token: {'[PRESENT]' if token.refresh_token else '[MISSING]'}")
|
||||
else:
|
||||
print("No Fitbit token found in DB")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
Reference in New Issue
Block a user