Follow+Notes: Expose grant notes retrieval in Finder API #3205
Labels
collaboration
good first issue
Good for newcomers
Grant Finder
Issues related to the Grant Finder
javascript
Pull requests that update Javascript code
Subtask of [STORY]: Update 'Status' to 'Follow + Note' feature #2960
Blocked by
Blocks
Definition of Done
A new API route exists that allows users to publish (and revise) notes pertaining to a specific grant.
Implementation Details
In
packages/server/src/routes/grants.js
, define a newGET /:grantId/notes
API route handler as follows:getOrganizationNotesForGrant()
frompackages/server/src/lib/grantsCollaboration
to retrieve a (paginated) result set of notes pertaining to the grant and organization identified in the request path.?paginateFrom
query parameter value is provided in the request, that value should be provided as theafterRevision
argument in the call togetOrganizationNotesForGrant()
.?limit
query parameter value is provided in the request, that value (as a parsed integer) should be provided as thelimit
argument in the call togetOrganizationNotesForGrant()
. Additionally, this value must pass the following validation checks (or else respond with a400 Bad Request
status):getOrganizationNotesForGrant()
, provides the function's return value as a JSON-serialized response.The text was updated successfully, but these errors were encountered: