Add a user service and load the user information dynamically from the backend.

This commit is contained in:
yackob03 2013-09-26 19:59:58 -04:00
parent ccc6e3bd2e
commit 2f98c95d21
4 changed files with 49 additions and 4 deletions

View file

@ -19,6 +19,18 @@ def welcome():
return make_response('welcome', 200)
@app.route('/api/user/')
@login_required
def get_logged_in_user():
user = current_user.db_user
return jsonify({
'verified': user.verified,
'anonymous': False,
'username': user.username,
'email': user.email,
})
@app.route('/api/repository/', methods=['POST'])
@login_required
def create_repo_api():