Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from flask.ext.login import current_user
@api.resource('/user/logged')
class Logged(Resource):
def get(self):
try:
return {"logged": current_user.to_dict()}
except AttributeError:
return {'logged': None}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment