Skip to content

Conversation

@HermanPlay
Copy link
Member

No description provided.

@HermanPlay HermanPlay requested a review from a team as a code owner January 15, 2026 17:58
Copilot AI review requested due to automatic review settings January 15, 2026 17:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds two new API endpoints for managing individual contest task settings: one to retrieve task settings and another to edit them. The implementation includes service layer logic, repository changes to support both create and update operations, custom validation for date constraints, and the necessary route handlers.

Changes:

  • Added GetContestTaskSettings and EditContestTask methods to the contest service for managing individual task settings within contests
  • Renamed repository method from AddTaskToContest to SaveContestTask and changed from Create to Save to support both adding and updating contest tasks
  • Added ContestTaskSettings schema and EndAtAfterStartAt struct-level validator to ensure EndAt is after StartAt

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
package/utils/utils.go Adds struct-level validator EndAtAfterStartAt and registers it for ContestTaskSettings
package/service/mocks/mockgen.go Adds mock methods for new service interface methods
package/service/contest_service.go Adds GetContestTaskSettings and EditContestTask service methods, updates AddTaskToContest to use renamed repository method
package/repository/mocks/mockgen.go Updates mock to reflect repository method rename from AddTaskToContest to SaveContestTask
package/repository/contest.go Renames AddTaskToContest to SaveContestTask and changes from Create to Save to support updates
package/domain/schemas/contest.go Adds ContestTaskSettings schema for task-specific settings
internal/api/http/routes/tasks_management.go Minor formatting improvements to Swagger comments
internal/api/http/routes/contests_management.go Adds GetContestTask and EditContestTask route handlers, reorders interface methods alphabetically, registers new routes

HermanPlay and others added 4 commits January 15, 2026 19:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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