API - minor change
This commit is contained in:
parent
7f3dfd5049
commit
318418bd55
@ -380,10 +380,8 @@ def get_activity_data(auth_user_id, activity_id, data_type, segment_id=None):
|
||||
if response_object:
|
||||
return jsonify(response_object), code
|
||||
if not activity.gpx or activity.gpx == '':
|
||||
response_object = {
|
||||
'status': 'fail',
|
||||
'message': f'No gpx file for this activity (id: {activity_id})',
|
||||
}
|
||||
message = f'No gpx file for this activity (id: {activity_id})'
|
||||
response_object = {'status': 'fail', 'message': message}
|
||||
return jsonify(response_object), 400
|
||||
|
||||
try:
|
||||
|
@ -432,10 +432,8 @@ def edit_user(user_id):
|
||||
|
||||
if password is not None and password != '':
|
||||
if password_conf != password:
|
||||
response_object = {
|
||||
'status': 'error',
|
||||
'message': 'Password and password confirmation don\'t match.\n',
|
||||
}
|
||||
message = 'Password and password confirmation don\'t match.\n'
|
||||
response_object = {'status': 'error', 'message': message}
|
||||
return jsonify(response_object), 400
|
||||
else:
|
||||
password = bcrypt.generate_password_hash(
|
||||
|
Loading…
Reference in New Issue
Block a user