IG-287: IG-252 Parent story Persist data-access-request to db
Created by: CMarksPA
Issue As a user I would like to Persist application state to database.
Solution Flow has been updated and from dataSet page to data-acess-request/{dataSetId}, the API will check to see if the user has requested the dataset before. There are a couple of things which happen in the API
- GET - Request to pi/v1/data-access-request/:{dataSetId}
- Cookie is used to see if User is logged in or not
- API will check if the user has requested this dataset before if not it will go and get the custodian schema and bring back the active set and create a new entry for the user. If the user has a previous entry it will return.
- PATCH - This handles the user updating their questions from the front, it uses the mongo _id to find the record and PATCH the questionAnswers object.
- Swagger documentation has been updated for the two new endpoints