Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow+Notes: Expose grant notes retrieval in Finder API #3205

Open
Tracked by #2960
TylerHendrickson opened this issue Jun 21, 2024 · 0 comments
Open
Tracked by #2960

Follow+Notes: Expose grant notes retrieval in Finder API #3205

TylerHendrickson opened this issue Jun 21, 2024 · 0 comments
Assignees
Labels
collaboration good first issue Good for newcomers Grant Finder Issues related to the Grant Finder javascript Pull requests that update Javascript code

Comments

@TylerHendrickson
Copy link
Member

TylerHendrickson commented Jun 21, 2024

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 new GET /:grantId/notes API route handler as follows:

  • Requires authentication.
  • Calls getOrganizationNotesForGrant() from packages/server/src/lib/grantsCollaboration to retrieve a (paginated) result set of notes pertaining to the grant and organization identified in the request path.
    • If a ?paginateFrom query parameter value is provided in the request, that value should be provided as the afterRevision argument in the call to getOrganizationNotesForGrant().
    • If a ?limit query parameter value is provided in the request, that value (as a parsed integer) should be provided as the limit argument in the call to getOrganizationNotesForGrant(). Additionally, this value must pass the following validation checks (or else respond with a 400 Bad Request status):
      • Can be successfully parsed as an integer
      • Parsed integer value must be greater than or equal to 1
      • Parsed integer value must not exceed 100
  • Following a successful call to getOrganizationNotesForGrant(), provides the function's return value as a JSON-serialized response.
@TylerHendrickson TylerHendrickson added Grant Finder Issues related to the Grant Finder javascript Pull requests that update Javascript code labels Jun 21, 2024
@greg-adams greg-adams self-assigned this Aug 13, 2024
@ClaireValdivia ClaireValdivia added the good first issue Good for newcomers label Aug 13, 2024
@greg-adams greg-adams moved this from 🔖 Ready to 🏗 In progress in Grants Team Agile Planning Aug 14, 2024
@greg-adams greg-adams moved this from 🏗 In progress to 👀 In review in Grants Team Agile Planning Aug 15, 2024
@greg-adams greg-adams moved this from 👀 In review to ✅ Staging in Grants Team Agile Planning Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collaboration good first issue Good for newcomers Grant Finder Issues related to the Grant Finder javascript Pull requests that update Javascript code
Projects
Status: 🚢 Completed
Development

No branches or pull requests

3 participants