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 cce57bca72 - Show all commits

View File

@ -34,8 +34,11 @@ def create_token():
refresh_token = data.get('refresh_token')
expiration_seconds = data.get('expiration_seconds')
if not email or access_token or not refresh_token or not expiration_seconds:
return 'Missing required fields', 400
required_fields = ['email', 'access_token', 'refresh_token', 'expiration_seconds']
missing_fields = [field for field in required_fields if not data.get(field)]
if missing_fields:
return jsonify({'error': f'Missing required fields: {", ".join(missing_fields)}'}), 400
# unique email when active is true
existing_token = Token.query.filter_by(email=email, active=True).first()