Allow non-browser requests to upload Networks and create tests

This commit is contained in:
Andrew Grant committed 2022-05-19 08:16:10 -04:00
1 parent 5fde447ff0
commit c31a9a0b2d
4 files changed
+83

No files matched your search

+15
View File
@@ -580,6 +580,21 @@ def networks(request, action=None, sha256=None, client=False):
return response
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# OPENBENCH SCRIPTING #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@csrf_exempt
def scripts(request):
login(request) # All requests are attached to a User
if request.POST['action'] == 'UPLOAD':
return networks(request, action='UPLOAD')
if request.POST['action'] == 'CREATE_TEST':
return newTest(request)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# CLIENT HOOK VIEWS #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #