diff --git a/core/templates/partials/hook-list.html b/core/templates/partials/hook-list.html index 9b3fea5..3b2aa3a 100644 --- a/core/templates/partials/hook-list.html +++ b/core/templates/partials/hook-list.html @@ -13,8 +13,8 @@ {{ item.id }} {{ item.user }} - {{settings.URL}}/{{settings.HOOK_PATH}}/{{ item.name }} - {{ item.hook }} + {{ item.name }} + {{settings.URL}}/{{settings.HOOK_PATH}}/{{ item.hook }} {{ item.received }}
diff --git a/core/views/hooks.py b/core/views/hooks.py index 650db04..e7c8e78 100644 --- a/core/views/hooks.py +++ b/core/views/hooks.py @@ -23,7 +23,7 @@ class HookAPI(APIView): def post(self, request, hook_name): print("DATA", request.data) try: - hook = Hook.objects.get(name=hook_name) + hook = Hook.objects.get(hook=hook_name) except Hook.DoesNotExist: return HttpResponseBadRequest("Hook does not exist.") callback = Callback.objects.create(