Skip to content

#4606 edit competition performance - #4637

Open
HLaPides wants to merge 4 commits into
feature/executive-summaryfrom
#4606_editCompetitionPerformance
Open

HLaPides wants to merge 4 commits into
feature/executive-summaryfrom
#4606_editCompetitionPerformance

Conversation

@HLaPides

Copy link
Copy Markdown

Changes

Added the editCompetitionPerformance route, service, and controller as per the ticket. It authenticates that the user is an Admin/Ops team member the same way that editExecutiveSummary does. Added a createTestCompetitionPerformance to test utils and created unit tests for the endpoint itself

Test Cases

  1. Access denied error thrown when user is not an admin or ops team member
  2. correctly fails if the competition performance does not exist
  3. correctly fails if the competition performance belongs to a different org
  4. Successful edit as admin
  5. Successful edit as ops team
  6. Successfully clear fields by passing null

Screenshots

Manual Testing:

  1. Test that auth works
image
  1. Successful call

before
image

request
image

after

image

Closes #4606

@HLaPides HLaPides self-assigned this Oct 23, 2026
@HLaPides
HLaPides requested a review from staysgt October 23, 2026 18:55

@staysgt staysgt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good work!

@staysgt
staysgt requested a review from wavehassman October 25, 2026 21:22

@wavehassman wavehassman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

great job! just a couple things

if (!currentCompetitionPerformance) {
throw new NotFoundException('Competition Performance', competitionPerformanceId);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also need to check if the performance has been deleted


execSummaryRouter.post(
'/competition-performance/:competitionPerformanceId/edit',
body('finalPlace').optional({ nullable: true }).isInt(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i would drop nullable:true on all of these

This branch has not been deployed

No deployments
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.

3 participants