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

Admin notes/tournament endpoints #433

Merged
merged 12 commits into from
Oct 5, 2024
Merged

Conversation

myssto
Copy link
Contributor

@myssto myssto commented Sep 27, 2024

Depends on #431
Completes Tournament task of #379

I wanted to experiment with a little organization in this one. Since some of the controllers are going to start getting quite large, I think it would be nice if we could branch off certain groups of features into their own partial. For example here, any admin feature related endpoint definitions for /tournaments would now exist in the API/Controllers/TournamentsController.Admin.cs file.

@myssto
Copy link
Contributor Author

myssto commented Sep 27, 2024

I do realize that this means PATCH /tournaments should be moved onto this new partial as well, but I can make that a separate PR after this one gets through

@hburn7
Copy link
Collaborator

hburn7 commented Sep 27, 2024

Did you also run into this? This happens immediately after starting the API.

[2024-09-27 00:05:22.352 ERR] An unhandled exception has occurred while executing the request.
Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Conflicting method/path combination "PATCH api/v1/tournaments/{id}/notes/{noteId}" for actions - API.Controllers.TournamentsController.UpdateAdminNoteAsync (API),API.Controllers.TournamentsController.DeleteAdminNoteAsync (API). Actions require a unique method/path combination for Swagger/OpenAPI 3.0. Use ConflictingActionsResolver as a workaround
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GenerateOperations(IEnumerable1 apiDescriptions, SchemaRepository schemaRepository) at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GeneratePaths(IEnumerable1 apiDescriptions, SchemaRepository schemaRepository)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwaggerDocumentWithoutFilters(String documentName, String host, String basePath)
at Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenerator.GetSwaggerAsync(String documentName, String host, String basePath)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.RateLimiting.RateLimitingMiddleware.InvokeInternal(HttpContext context, EnableRateLimitingAttribute enableRateLimitingAttribute)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at API.Middlewares.RequestLoggingMiddleware.Invoke(HttpContext context) in /Users/stage/Documents/github/otr-api/API/Middlewares/RequestLoggingMiddleware.cs:line 20
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

@myssto
Copy link
Contributor Author

myssto commented Sep 27, 2024

yea oops W copy paste from me. the patch and delete methods were both using a [HttpPatch] attribute

Copy link
Collaborator

@hburn7 hburn7 left a comment

Choose a reason for hiding this comment

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

Can be merged once all endpoints / service methods etc. are tested locally.

API/DTOs/AdminNoteDTO.cs Outdated Show resolved Hide resolved
@hburn7
Copy link
Collaborator

hburn7 commented Oct 5, 2024

Updated to configure relationship between User and TournamentAdminNote.

@hburn7 hburn7 merged commit af716d1 into master Oct 5, 2024
2 checks passed
@hburn7 hburn7 deleted the admin-notes/tournament-endpoints branch October 5, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants