Merged
Conversation
pull from main
pull from main
pull from main
responsive fix (TheGradients#162)
pull from main
pull from main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes to the backend of the application, primarily focusing on the management of tournaments, including creation, editing, deletion, and result handling. The changes also include the addition of new routes and controllers for admin functionalities.
New routes and controllers:
Backend/src/app.js: Added a new admin route and importedadminRouterto handle admin-specific requests.Backend/src/routes/admin.routes.js: Created new routes for admin functionalities such as creating, editing, and deleting tournaments, as well as managing IDP and tournament results.Backend/src/controllers/admin.controller.js: Implemented new controller functions for handling tournament creation, editing, deletion, IDP management, and result posting/editing.Model updates:
Backend/src/models/idp.models.js: Added a newIDPmodel to store information about IDP associated with tournaments.Backend/src/models/result.models.js: Updated theResultmodel to include validation checks and ensure that players are registered in the tournament before adding results. [1] [2] [3]Backend/src/models/tournament.models.js: Added a reference to theIDPmodel in theTournamentschema.Refactoring and cleanup:
Backend/src/controllers/tournament.controller.js: Removed admin-controlled routes and functions, which are now handled by the new admin controller. [1] [2]Backend/src/routes/tournament.routes.js: Removed admin-specific routes and cleaned up the file to focus on user-accessible routes.