Skip to content

Conversation

@staysgt
Copy link
Contributor

@staysgt staysgt commented Mar 19, 2025

Changes

Created the editSponsorTask endpoint.

Test Cases

  • successful edit
  • fails if bad user id given
  • fails if bad sponsor id given
  • fails if user that is not head tries to edit

Screenshots

Screenshot 2025-03-21 at 6 30 11 PM Screenshot 2025-03-21 at 6 31 40 PM Screenshot 2025-03-21 at 6 30 20 PM Screenshot 2025-03-21 at 6 30 46 PM

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #3210

@staysgt staysgt self-assigned this Mar 19, 2025
@kyanbarker
Copy link
Contributor

kyanbarker commented Mar 19, 2025

Looks great! I would maybe do postman tests for bad user id and bad sponsor id as well just to be super thorough but I'll ask Jack and Waverly to see what they think!

Copy link
Contributor

@dreifusjack dreifusjack left a comment

Choose a reason for hiding this comment

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

Great start Sarah! Just left some small reviews, lmk if you have any questions

@staysgt staysgt requested a review from dreifusjack March 22, 2025 00:16
Copy link
Contributor

@dreifusjack dreifusjack left a comment

Choose a reason for hiding this comment

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

Just some small changes, lmk if you have any questions

@staysgt staysgt requested a review from dreifusjack March 23, 2025 22:13
dreifusjack
dreifusjack previously approved these changes Mar 24, 2025
Copy link
Contributor

@dreifusjack dreifusjack left a comment

Choose a reason for hiding this comment

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

LGTM. Also when you fix a requested change, can you click resolve conversation? Just to clean up the pr. Thanks!

@staysgt staysgt requested a review from walker-sean March 26, 2025 02:57
if (!(await userHasPermission(submitter.userId, org.organizationId, isHead)))
throw new AccessDeniedException('Only heads can edit sponsor tasks.');

const oldSponsorTask = await prisma.sponsor_Task.findUnique({
Copy link
Member

Choose a reason for hiding this comment

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

Search within the organization


if (!oldSponsorTask) throw new NotFoundException('SponsorTask', sponsorTaskId);

if (assigneeUserId) {
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@walker-sean walker-sean merged commit b35bbdb into feature/finance-redesign Apr 1, 2025
4 checks passed
@walker-sean walker-sean deleted the #3210-editSponsorTask-endpoint branch April 1, 2025 03:02
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.

5 participants