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

2248 delete team type endpoint #3120

Merged
merged 6 commits into from
Jan 14, 2025
Merged

Conversation

cielbellerose
Copy link
Contributor

@cielbellerose cielbellerose commented Jan 13, 2025

Changes

Endpoint that soft deletes a single team type.

Test Cases

  • delete team type fails if user is not admin
  • delete team type fails if team type doesn't exist
  • delete team type fails if team type is already deleted
  • delete team type correctly updates dateDeleted and deletedById

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 #2248

@cielbellerose cielbellerose linked an issue Jan 13, 2025 that may be closed by this pull request
@cielbellerose cielbellerose self-assigned this Jan 13, 2025
Copy link
Contributor

@Peyton-McKee Peyton-McKee left a comment

Choose a reason for hiding this comment

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

Looks great, shouldbe good after adding that one other check.


if (!teamType) throw new NotFoundException('Team Type', teamTypeId);
if (teamType.dateDeleted) throw new DeletedException('Team Type', teamTypeId);

Copy link
Contributor

Choose a reason for hiding this comment

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

one other check we need is that the teamtype is in the current organization.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added!

@Peyton-McKee Peyton-McKee merged commit 0644a1b into develop Jan 14, 2025
4 checks passed
@Peyton-McKee Peyton-McKee deleted the 2248-delete-team-type-endpopint branch January 14, 2025 00:22
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.

Delete team type endpopint
2 participants