Compare commits

...

2 Commits

Author SHA1 Message Date
Swapnil b098f0b145
fixes 2024-01-30 21:15:57 +05:30
Swapnil 49bca30c88
fixes 2024-01-30 21:15:49 +05:30
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ def home():
last_synced = datetime.fromtimestamp(token.get('timestamp')).strftime('%Y-%m-%d %H:%M:%S')
next_sync = datetime.fromtimestamp(token.get('timestamp') + token.get('expiration_seconds')).strftime('%Y-%m-%d %H:%M:%S')
return render_template('home.html', user_info=user_info,
readwise_api_key=token.get('readwise_api_key', None),
readwise_api_key=token.get('readwise_api_key'),
last_synced=last_synced, next_sync=next_sync)
# Generate a CSRF protection string

View File

@ -16,7 +16,7 @@
<!-- Take readiwse api key input -->
<form action="/readwise" method="POST">
<label for="api_key">Readwise API Key</label>
<input type="text" name="readwise_api_key" id="api_key", value="{{ readwise_api_key }}">
<input type="text" name="readwise_api_key" id="api_key", value="{{ readwise_api_key }}" required>
<input type="submit" value="Submit">
</form>

View File

@ -60,7 +60,7 @@ def get_token_by_id(id):
'email': token.email,
'access_token': token.access_token,
'refresh_token': token.refresh_token,
'expiration_seconds': token.expiration_seconds,
'expiration_seconds': int(token.expiration_seconds),
'readwise_api_key': token.readwise_api_key,
'active': token.active,
'timestamp': int(token.timestamp.timestamp())