small fixes and tests

This commit is contained in:
vabene1111
2022-04-22 22:27:17 +02:00
parent 6953f763d2
commit 9adc1f7266
6 changed files with 1987 additions and 2159 deletions

View File

@ -1160,6 +1160,8 @@ def recipe_from_source(request):
- (optional) bookmarklet: id of bookmarklet import to use, overrides URL and data attributes
:return: JsonResponse containing the parsed json, original html,json and images
"""
if request.method == 'GET':
return HttpResponse(status=405)
request_payload = json.loads(request.body.decode('utf-8'))
url = request_payload.get('url', None)
data = request_payload.get('data', None)