Able to create Multiple Drafts in the Backend using the same Temp identifier by altering the Filing ID
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 62
- Avg merge
- 24m
- Merged PRs (30d)
- 1
Description
**Describe the bug in the current situation**
API users can create multiple drafts with the same Temp_Id by just altering the Filings id which the API should be blocking.
**Impact of this bug**
API users might create Multiple Drafts, which can't be deleted from the UI
Steps to reproduce the behavior:
1. Hit 'https://test.api.connect.gov.bc.ca/business-dev/api/v2/businesses/TI4mpxDseL/filings/233758?draft=true' from Postman
2. Add a valid Token and the X-API-Key
3. Send a Post request
4. In the db notice that there are two drafts with the same temp_id='TI4mpxDseL'
5. Now return to the UI and delete the draft. It says 500 internal server error.
**Actual/ observed behavior/ results**
API should prevent another POST response from the BE
**Screenshots/ Visual Reference/ Source**


**Root Cause Analysis (RCA) results**
If applicable, document the root cause analysis results for the scenarios. This section is mandatory before the issue can be closed
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.