diff --git a/Azaion.Api/Program.cs b/Azaion.Api/Program.cs index 142f11f..632893d 100644 --- a/Azaion.Api/Program.cs +++ b/Azaion.Api/Program.cs @@ -171,8 +171,8 @@ app.MapPost("/resources/get/{dataFolder?}", //Need to have POST method for secur }).RequireAuthorization() .WithOpenApi(op => new OpenApiOperation(op){ Summary = "Gets encrypted by users Password and HardwareHash resources. POST method for secure password"}); -app.MapPut("/resources/reset-hardware", - async (string email, IUserService userService, ICache cache, CancellationToken cancellationToken) => +app.MapPut("/resources/reset-hardware/{email}", + async ([FromRoute]string email, IUserService userService, ICache cache, CancellationToken cancellationToken) => await userService.UpdateHardware(email, cancellationToken: cancellationToken)) .RequireAuthorization(apiAdminPolicy) .WithOpenApi(op => new OpenApiOperation(op){ Summary = "Resets hardware id in case of hardware change"}); diff --git a/Azaion.Common/BusinessException.cs b/Azaion.Common/BusinessException.cs index 5ec5268..43033d6 100644 --- a/Azaion.Common/BusinessException.cs +++ b/Azaion.Common/BusinessException.cs @@ -31,6 +31,7 @@ public enum ExceptionEnum [Description("Password should be at least 8 characters.")] PasswordLengthIncorrect = 32, + [Description("Email is empty or invalid.")] EmailLengthIncorrect = 35, WrongEmail = 37,