-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add enpdoints #231
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
base: master
Are you sure you want to change the base?
feat: add enpdoints #231
Conversation
0291383 to
d5224c4
Compare
There was a problem hiding this 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
GetContestTaskSettingsandEditContestTaskmethods to the contest service for managing individual task settings within contests - Renamed repository method from
AddTaskToContesttoSaveContestTaskand changed fromCreatetoSaveto support both adding and updating contest tasks - Added
ContestTaskSettingsschema andEndAtAfterStartAtstruct-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 |
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>
No description provided.