IHTSDO / authoring-services

Other
2 stars 3 forks source link

PIP-82 - Added checks to make sure that the json state being persisted is of a valid format and fixed issue where it was not deleting persisted states under the user/<user>/ui-panel directory - it did not need the forward slash at the beginning as it uses the Amazon API which can determine this as it already knows the bucket. #13

Closed Tyler-Cooksey closed 3 years ago

Tyler-Cooksey commented 3 years ago

It was noted from Chris S that when writing the state, it doesn't check for malformed JSON so I've added in a check to make sure it will only persist states when the JSON is of a valid form. If not, it will return a 400 BAD REQUEST.

I also fixed an issue where it wasn't deleting properly from the user/<user>/ui-panel as it was appending a forward slash at the beginning of the path which wasn't needed due to using the Amazon S3 client for deletion.