Skip to content

Conversation

@adityapat24
Copy link
Contributor

ℹ️ Issue

Closes #137

📝 Description

Added functionality so that the status of grants are automatically updated from active to inactive if their timeline has expired

Briefly list the changes made to the code:

  1. Added a call to a makeGrantsInactive method when fetching all grants to update the status
  2. makeGrantsInactive updates the status to be inactive and returns the entire grant back
  3. List of updated grants added in all grants and returned to the user
  4. Updated grant controller to have an inactivate route

✔️ Verification

Wrote tests for new makeGrantsInactive method

Copy link
Collaborator

@prooflesben prooflesben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make the makeGrantInactive method just take in one grantId and in the outer method loop over the array you created. When you do it as an array in makeGrantInactive one grant erroring causes all the other grants to not be processed

@prooflesben prooflesben dismissed their stale review December 2, 2025 23:41

I fixed it myself

@prooflesben prooflesben merged commit b35e12f into main Dec 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DEV - Have grants ago from active to inactive automatically

3 participants