feature: finish git webhooks

This commit is contained in:
Usman Nasir
2020-03-19 22:13:47 +05:00
parent a80f6ebb50
commit 4179524bf5
4 changed files with 46 additions and 5 deletions

View File

@@ -859,5 +859,13 @@ def fetchGitLogs(request):
userID = request.session['userID']
wm = WebsiteManager()
return wm.fetchGitLogs(userID, json.loads(request.body))
except KeyError:
return redirect(loadLoginPage)
@csrf_exempt
def webhook(request, domain):
try:
wm = WebsiteManager()
return wm.webhook(domain, json.loads(request.body))
except KeyError:
return redirect(loadLoginPage)