Resolves issue 1606, persist ReviewObj History, add reject review endpoint, allow elevated secretariat squashing for review objs #1619
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes Issue 1606, 1609
New Endpoints
GET /review/org/:identifier/reviews— Paginated review history for an org; supports optional query params:include_conversationsandpagePUT /review/org/:uuid/reject— Reject a review object (sets status to rejected)Modified Endpoints
GET /review/orgs— Added pagination, supports optional query params:status(I did not validate the incoming options for this var but it is expecting "pending, "approved", or "rejected") andpageGET /review/org/:identifier— Now explicitly returns only PENDING review objects (error message clarified)PUT /review/org/:uuid/approve— Saves the review object as 'approved' instead of deleting the review objectLogic Changes
Additional change:
This allows reuse of approveReviewOrgObject in other contexts (e.g., secretariat stomp) without triggering org updates. (OR else, I would need to modify updateOrgFull's parameters to restrict circular logic)
Questions:
To-do: add unit and integration tests