Skip to content

Conversation

@swarkewalia
Copy link

ℹ️ Issue 97

Closes 97

📝 Description

Added a new endpoint (getApprovedPantries) to return all information necessary for the pantry management frontend about pantries with 'approved' status - includes assigned volunteers.
Added a second new endpoint (updatePantryVolunteers) to overwrite the set of volunteers assigned to a pantry with a new set of volunteers.
Added a type file for pantries and included ApprovedPantryResponse and AssignedVolunteer types.

✔️ Verification

Tested both endpoints using curl. Made sure GET endpoint retrieved all approved pantries with assigned volunteers, and that the PUT endpoint overwrites volunteer assignments successfully.

@swarkewalia swarkewalia changed the title get approved and update volunteer endpoints SSF 97 pantry management backend Dec 4, 2025
@dburkhart07
Copy link

See slack comment

@dburkhart07 dburkhart07 self-requested a review December 6, 2025 18:27
@swarkewalia swarkewalia force-pushed the sk/SSF-97-pantry-management-backend branch 2 times, most recently from 313c63d to 2577fbe Compare January 18, 2026 04:21
@swarkewalia swarkewalia force-pushed the sk/SSF-97-pantry-management-backend branch from 2577fbe to 265bad6 Compare January 18, 2026 04:39
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

Make these initial changes, also see message I sent you.

yarn-error.log
testem.log
/typings
.nx

Choose a reason for hiding this comment

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

Why is this here? Can we get rid of it?

pantries?: Pantry[];
}

export interface UserDto {

Choose a reason for hiding this comment

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

This should not be deleted either I dont think.

@sam-schu sam-schu removed the blocked label Jan 18, 2026
Copy link

@dburkhart07 dburkhart07 left a comment

Choose a reason for hiding this comment

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

Few initial things. Also, I do not see the second half of the ticket requirement to make a new endpoint for this: Add a new endpoint to overwrite the set of volunteers assigned to a pantry with a new set of volunteers for intended use case

email: string;
phone: string;
};
refrigeratedDonation: string;

Choose a reason for hiding this comment

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

This should use the enum

};
refrigeratedDonation: string;
allergenClients: string;
status: string;

Choose a reason for hiding this comment

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

Same here

@@ -1,3 +1,35 @@
export interface ApprovedPantryResponse {

Choose a reason for hiding this comment

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

I think we are going to need more info than this for our approved pantry response. For one, all these pantries are approved so we shouldnt need the status. Additionally, check out the Figma for the frontend: https://www.figma.com/design/brc5luMhizIFp893XIutYe/SP26---SSF-Designs?node-id=756-11085&t=3UiKr0MdYxCcdUUK-0

The modal that pops up with Pantry Details should tell you what information we need.

}


async getApprovedPantriesWithVolunteers(): Promise<ApprovedPantryResponse[]> {

Choose a reason for hiding this comment

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

See comment in the type.ts file, this will need to change too.

return this.pantriesService.getPendingPantries();
}

@Get('/approved')

Choose a reason for hiding this comment

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

We should write a test for this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants