Separate services - app, db, and job #1

Open
swapnil wants to merge 36 commits from swapnil/inoreader2readwise:main into main
Showing only changes of commit c377909954 - Show all commits

View File

@ -29,6 +29,9 @@ def create_token():
refresh_token = data.get('refresh_token') refresh_token = data.get('refresh_token')
expiration_seconds = data.get('expiration_seconds') 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) new_token = Token(access_token=access_token, refresh_token=refresh_token, expiration_seconds=expiration_seconds)
db.session.add(new_token) db.session.add(new_token)
db.session.commit() db.session.commit()