diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-01-25 03:03:45 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-01-25 03:03:45 +0000 |
commit | 19a626e2377997b23a176b4e65a33ea3e31ea467 (patch) | |
tree | 36b818984ca8212797807dc4a1da3f74247abd9b /app/blueprints/github/__init__.py | |
parent | 43c2ee6b7b55ea864568689946c5732d16b2f722 (diff) | |
download | cheatdb-19a626e2377997b23a176b4e65a33ea3e31ea467.tar.xz |
Fix auto-webhook creation failure due to wrong scheme
Diffstat (limited to 'app/blueprints/github/__init__.py')
-rw-r--r-- | app/blueprints/github/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/blueprints/github/__init__.py b/app/blueprints/github/__init__.py index b3be731..c65a68d 100644 --- a/app/blueprints/github/__init__.py +++ b/app/blueprints/github/__init__.py @@ -24,7 +24,7 @@ from sqlalchemy import func from flask_github import GitHub from app import github, csrf from app.models import db, User, APIToken, Package, Permission -from app.utils import loginUser, randomString +from app.utils import loginUser, randomString, abs_url_for from app.blueprints.api.support import error, handleCreateRelease import hmac, requests, json @@ -180,7 +180,7 @@ def setup_webhook(): if current_user.github_access_token is None: return github.authorize("write:repo_hook", \ - redirect_uri=url_for("github.callback_webhook", pid=pid, _external=True)) + redirect_uri=abs_url_for("github.callback_webhook", pid=pid)) form = SetupWebhookForm(formdata=request.form) if request.method == "POST" and form.validate(): @@ -214,7 +214,7 @@ def handleMakeWebhook(gh_user, gh_repo, package, oauth, event, token): "active": True, "events": [event], "config": { - "url": url_for("github.webhook", _external=True), + "url": abs_url_for("github.webhook"), "content_type": "json", "secret": token.access_token }, |