url_for must reference the blueprint name now.
This commit is contained in:
parent
f908791154
commit
2ddbad3d39
2 changed files with 7 additions and 5 deletions
|
@ -1249,7 +1249,8 @@ def create_webhook(namespace, repository):
|
||||||
webhook = model.create_webhook(repo, request.get_json())
|
webhook = model.create_webhook(repo, request.get_json())
|
||||||
resp = jsonify(webhook_view(webhook))
|
resp = jsonify(webhook_view(webhook))
|
||||||
repo_string = '%s/%s' % (namespace, repository)
|
repo_string = '%s/%s' % (namespace, repository)
|
||||||
resp.headers['Location'] = url_for('get_webhook', repository=repo_string,
|
resp.headers['Location'] = url_for('api.get_webhook',
|
||||||
|
repository=repo_string,
|
||||||
public_id=webhook.public_id)
|
public_id=webhook.public_id)
|
||||||
log_action('add_repo_webhook', namespace,
|
log_action('add_repo_webhook', namespace,
|
||||||
{'repo': repository, 'webhook_id': webhook.public_id},
|
{'repo': repository, 'webhook_id': webhook.public_id},
|
||||||
|
|
|
@ -242,7 +242,7 @@ def github_oauth_callback():
|
||||||
return render_page_template('githuberror.html', error_message=ex.message)
|
return render_page_template('githuberror.html', error_message=ex.message)
|
||||||
|
|
||||||
if common_login(to_login):
|
if common_login(to_login):
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('web.index'))
|
||||||
|
|
||||||
return render_page_template('githuberror.html')
|
return render_page_template('githuberror.html')
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ def github_oauth_attach():
|
||||||
github_id = user_data['id']
|
github_id = user_data['id']
|
||||||
user_obj = current_user.db_user()
|
user_obj = current_user.db_user()
|
||||||
model.attach_federated_login(user_obj, 'github', github_id)
|
model.attach_federated_login(user_obj, 'github', github_id)
|
||||||
return redirect(url_for('user'))
|
return redirect(url_for('web.user'))
|
||||||
|
|
||||||
|
|
||||||
@web.route('/confirm', methods=['GET'])
|
@web.route('/confirm', methods=['GET'])
|
||||||
|
@ -271,7 +271,8 @@ def confirm_email():
|
||||||
|
|
||||||
common_login(user)
|
common_login(user)
|
||||||
|
|
||||||
return redirect(url_for('user', tab='email') if new_email else url_for('index'))
|
return redirect(url_for('web.user', tab='email')
|
||||||
|
if new_email else url_for('web.index'))
|
||||||
|
|
||||||
|
|
||||||
@web.route('/recovery', methods=['GET'])
|
@web.route('/recovery', methods=['GET'])
|
||||||
|
@ -281,6 +282,6 @@ def confirm_recovery():
|
||||||
|
|
||||||
if user:
|
if user:
|
||||||
common_login(user)
|
common_login(user)
|
||||||
return redirect(url_for('user'))
|
return redirect(url_for('web.user'))
|
||||||
else:
|
else:
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
Reference in a new issue