Skip to content

[SSF 163] - Fix Donation Creation Bug and Improve API Design#128

Open
dburkhart07 wants to merge 6 commits intomainfrom
ddb/SSF-163-fix-donation-create-bug
Open

[SSF 163] - Fix Donation Creation Bug and Improve API Design#128
dburkhart07 wants to merge 6 commits intomainfrom
ddb/SSF-163-fix-donation-create-bug

Conversation

@dburkhart07
Copy link

@dburkhart07 dburkhart07 commented Mar 16, 2026

ℹ️ Issue

Closes #163

📝 Description

For this PR, I removed the usage of creating multiple donation items, in favor of keeping it all in one spot: the donation service's create endpoint. This now creates all of it in one spot, allowing us to easily verify the creation of donations and donation items all in one transaction. This required minimal frontend changes to properly format and make work. I also removed any usage of reservedQuantity, having that value only be used on creation time of donation items.

I also wrote tests for the create service function, as well as all new tests for the donation item's service.

✔️ Verification

  • Verified all endpoints worked in postman, and that all tests pass.

@dburkhart07 dburkhart07 marked this pull request as ready for review March 16, 2026 00:18
@dburkhart07 dburkhart07 changed the title Final commit [SSF 163] - Fix Donation Creation Bug and Improve API Design Mar 16, 2026
items!: CreateDonationItemDto[];
@IsBoolean()
@IsOptional()
foodRescue?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this just wasn't here before at all?

Copy link
Author

Choose a reason for hiding this comment

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

discussed in slack, making this required, defaulting to false.

@dburkhart07 dburkhart07 requested a review from sam-schu March 19, 2026 06:01
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.

2 participants