Search hooks by hook name instead of name

This commit is contained in:
2022-10-15 23:13:41 +01:00
parent 62ad699890
commit a15ebaf82c
2 changed files with 3 additions and 3 deletions

View File

@@ -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(