forked from PeterSurda/inoreader2readwise
fix: database check
This commit is contained in:
parent
34282e6f30
commit
c377909954
|
@ -29,6 +29,9 @@ def create_token():
|
|||
refresh_token = data.get('refresh_token')
|
||||
expiration_seconds = data.get('expiration_seconds')
|
||||
|
||||
if not access_token or not refresh_token or not expiration_seconds:
|
||||
return 'Missing required fields', 400
|
||||
|
||||
new_token = Token(access_token=access_token, refresh_token=refresh_token, expiration_seconds=expiration_seconds)
|
||||
db.session.add(new_token)
|
||||
db.session.commit()
|
||||
|
|
Loading…
Reference in New Issue
Block a user