mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 09:06:33 +00:00
fix reset hw endpoint
This commit is contained in:
@@ -171,8 +171,8 @@ app.MapPost("/resources/get/{dataFolder?}", //Need to have POST method for secur
|
|||||||
}).RequireAuthorization()
|
}).RequireAuthorization()
|
||||||
.WithOpenApi(op => new OpenApiOperation(op){ Summary = "Gets encrypted by users Password and HardwareHash resources. POST method for secure password"});
|
.WithOpenApi(op => new OpenApiOperation(op){ Summary = "Gets encrypted by users Password and HardwareHash resources. POST method for secure password"});
|
||||||
|
|
||||||
app.MapPut("/resources/reset-hardware",
|
app.MapPut("/resources/reset-hardware/{email}",
|
||||||
async (string email, IUserService userService, ICache cache, CancellationToken cancellationToken) =>
|
async ([FromRoute]string email, IUserService userService, ICache cache, CancellationToken cancellationToken) =>
|
||||||
await userService.UpdateHardware(email, cancellationToken: cancellationToken))
|
await userService.UpdateHardware(email, cancellationToken: cancellationToken))
|
||||||
.RequireAuthorization(apiAdminPolicy)
|
.RequireAuthorization(apiAdminPolicy)
|
||||||
.WithOpenApi(op => new OpenApiOperation(op){ Summary = "Resets hardware id in case of hardware change"});
|
.WithOpenApi(op => new OpenApiOperation(op){ Summary = "Resets hardware id in case of hardware change"});
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public enum ExceptionEnum
|
|||||||
[Description("Password should be at least 8 characters.")]
|
[Description("Password should be at least 8 characters.")]
|
||||||
PasswordLengthIncorrect = 32,
|
PasswordLengthIncorrect = 32,
|
||||||
|
|
||||||
|
[Description("Email is empty or invalid.")]
|
||||||
EmailLengthIncorrect = 35,
|
EmailLengthIncorrect = 35,
|
||||||
|
|
||||||
WrongEmail = 37,
|
WrongEmail = 37,
|
||||||
|
|||||||
Reference in New Issue
Block a user