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}
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}