From 4ffb86314b51c916af26fd56eea9fdefb4735c11 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 30 Jan 2014 17:23:21 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20all=20non-test=20url=5Ffor=E2=80=99s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- endpoints/api.py | 2 +- endpoints/common.py | 2 +- endpoints/web.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/endpoints/api.py b/endpoints/api.py index da37c2508..7f63c7379 100644 --- a/endpoints/api.py +++ b/endpoints/api.py @@ -1242,7 +1242,7 @@ def create_webhook(namespace, repository): webhook = model.create_webhook(repo, request.get_json()) resp = jsonify(webhook_view(webhook)) 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) log_action('add_repo_webhook', namespace, {'repo': repository, 'webhook_id': webhook.public_id}, diff --git a/endpoints/common.py b/endpoints/common.py index 2648f5e9c..ec4727edb 100644 --- a/endpoints/common.py +++ b/endpoints/common.py @@ -2,7 +2,7 @@ import logging import os import base64 -from flask import request, abort, session +from flask import request, abort, session, make_response from flask.ext.login import login_user, UserMixin from flask.ext.principal import identity_changed diff --git a/endpoints/web.py b/endpoints/web.py index 57d15164a..6307d1b50 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -242,7 +242,7 @@ def github_oauth_callback(): return render_page_template('githuberror.html', error_message=ex.message) if common_login(to_login): - return redirect(url_for('index')) + return redirect(url_for('web.index')) return render_page_template('githuberror.html') @@ -255,7 +255,7 @@ def github_oauth_attach(): github_id = user_data['id'] user_obj = current_user.db_user() 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']) @@ -271,7 +271,7 @@ def confirm_email(): 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']) @@ -281,6 +281,6 @@ def confirm_recovery(): if user: common_login(user) - return redirect(url_for('user')) + return redirect(url_for('web.user')) else: abort(403)