Search hooks by hook name instead of name
This commit is contained in:
parent
62ad699890
commit
a15ebaf82c
|
@ -13,8 +13,8 @@
|
|||
<tr>
|
||||
<td>{{ item.id }}</td>
|
||||
<td>{{ item.user }}</td>
|
||||
<td><code>{{settings.URL}}/{{settings.HOOK_PATH}}/{{ item.name }}</code></td>
|
||||
<td>{{ item.hook }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td><code>{{settings.URL}}/{{settings.HOOK_PATH}}/{{ item.hook }}</code></td>
|
||||
<td>{{ item.received }}</td>
|
||||
<td>
|
||||
<div class="buttons">
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue