Created
June 7, 2016 16:54
-
-
Save IuryAlves/5b0d561deae863801bbdda9b4743f57e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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