コード例 #1
0
ファイル: api.py プロジェクト: ravivooda/rent-history
def signup():
    user_name = request.args.get('user_name')
    display_name = request.args.get('display_name')
    email = request.args.get('email')
    password = request.args.get('password')
    user,error = logic.signup(user_name,display_name,email,password)
    if error:
        return {'success': False, 'error': error}
    session['user_id'] = user_info['user_id']
    return {'success': True, 'my_info':user}
コード例 #2
0
ファイル: api.py プロジェクト: ravivooda/teamup
def signup():
    # for now user_name, display_name, email, password are required
    if not request.args.get('user_name') or not request.args.get('display_name') or not request.args.get('email') or not request.args.get('password'):
        return {'success': False, 'error': env_constants.INVALID_REQUEST_ERROR}
    
    user_name = request.args.get('user_name')
    display_name = request.args.get('display_name')
    email = request.args.get('email')
    password = request.args.get('password')
    user,error = logic.signup(user_name,display_name,email,password)
    if error:
        return {'success': False, 'error': error}
    session['user_id'] = user_info['user_id']
    return {'success': True, 'my_info':user}