Skip to content

Commit

Permalink
Merge pull request #9 from HammerheadShark666/remove-logger-from-endp…
Browse files Browse the repository at this point in the history
…oints

Remove logger from endpoints
  • Loading branch information
HammerheadShark666 authored Aug 20, 2024
2 parents 68cf491 + 722b3d4 commit 9cd30e5
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Microservice.Customer.Api/Endpoints/Endpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,10 @@ public static void ConfigureRoutes(this WebApplication app, ConfigurationManager
});

customerGroup.MapPut("/update", [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
async ([FromBody] UpdateCustomerRequest updateCustomerRequest, [FromServices] IMediator mediator, ICustomerHttpAccessor customerHttpAccessor, ILogger logger) =>
{
logger.LogInformation("Start - Update customer: {0}", updateCustomerRequest.Id);

async ([FromBody] UpdateCustomerRequest updateCustomerRequest, [FromServices] IMediator mediator, ICustomerHttpAccessor customerHttpAccessor) =>
{
updateCustomerRequest = updateCustomerRequest with { Id = customerHttpAccessor.CustomerId };
var updateCustomerResponse = await mediator.Send(updateCustomerRequest);

logger.LogInformation("End - Update customer: {0}", updateCustomerRequest.Id);

var updateCustomerResponse = await mediator.Send(updateCustomerRequest);
return Results.Ok(updateCustomerResponse);
})
.Accepts<UpdateCustomerRequest>("application/json")
Expand Down

0 comments on commit 9cd30e5

Please sign in to comment.