Skip to content

Commit

Permalink
Add route parameters to whitelist endpoints
Browse files Browse the repository at this point in the history
Update the player whitelist endpoints to include profileName and userUuid as route parameters, enhancing the specificity and flexibility of the API. This change ensures that operations are correctly associated with the specified profile and player.
  • Loading branch information
Gamer-VII committed Dec 8, 2024
1 parent cfc9543 commit 1b8bc23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gml.Web.Api/Core/Extensions/EndpointsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ public static WebApplication RegisterEndpoints(this WebApplication app)
.Produces<ResponseMessage>((int)HttpStatusCode.BadRequest)
.RequireAuthorization();

app.MapPost("/api/v1/profiles/players/whitelist", ProfileHandler.AddPlayerToWhiteList)
app.MapPost("/api/v1/profiles/{profileName}/players/whitelist/{userUuid}", ProfileHandler.AddPlayerToWhiteList)
.WithOpenApi(generatedOperation =>
{
generatedOperation.Summary = "Добавление игрока в белый список профиля";
Expand All @@ -612,7 +612,7 @@ public static WebApplication RegisterEndpoints(this WebApplication app)
.Produces<ResponseMessage>((int)HttpStatusCode.BadRequest)
.RequireAuthorization();

app.MapDelete("/api/v1/profiles/players/whitelist", ProfileHandler.RemovePlayerFromWhiteList)
app.MapDelete("/api/v1/profiles/{profileName}/players/whitelist/{userUuid}", ProfileHandler.RemovePlayerFromWhiteList)
.WithOpenApi(generatedOperation =>
{
generatedOperation.Summary = "Удаление игрока из белого списка профиля";
Expand Down

0 comments on commit 1b8bc23

Please sign in to comment.