-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make security approval section driven by exporter answer API
- Loading branch information
1 parent
f78967a
commit 6b8a19a
Showing
5 changed files
with
53 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from django.conf import settings | ||
|
||
|
||
from core import client | ||
|
||
|
||
def post_exporter_answer_set(request, flow, section, target_content_type, target_object_id, answers): | ||
data = { | ||
"flow": flow, | ||
"section": section, | ||
"answers": answers, | ||
"frontend_commit_sha": settings.GIT_COMMIT, | ||
"target_content_type": target_content_type, | ||
"target_object_id": target_object_id, | ||
} | ||
response = client.post(request, f"/exporter/exporter-answers/exporter-answer-set/", data) | ||
return response.json(), response.status_code | ||
|
||
|
||
def get_exporter_answer_set(request, target_object_id): | ||
response = client.get( | ||
request, f"/exporter/exporter-answers/exporter-answer-set/?target_object_id={target_object_id}&status=draft" | ||
) | ||
return response.json(), response.status_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters