mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 21:26:34 +00:00
fix reset hardware
This commit is contained in:
@@ -151,7 +151,7 @@ app.MapPost("/resources/{dataFolder?}",
|
||||
async ([FromRoute]string? dataFolder, IFormFile data, IResourcesService resourceService, CancellationToken cancellationToken)
|
||||
=> await resourceService.SaveResource(dataFolder, data, cancellationToken))
|
||||
.Accepts<IFormFile>("multipart/form-data")
|
||||
.RequireAuthorization()
|
||||
.RequireAuthorization(apiUploaderPolicy)
|
||||
//.WithOpenApi(op => new(op){ Summary = "Upload resource"}); //For some reason doesn't work when this is specified.
|
||||
.DisableAntiforgery();
|
||||
|
||||
@@ -173,7 +173,7 @@ app.MapPost("/resources/get/{dataFolder?}", //Need to have POST method for secur
|
||||
|
||||
app.MapPut("/resources/reset-hardware",
|
||||
async (string email, IUserService userService, ICache cache, CancellationToken cancellationToken) =>
|
||||
await userService.UpdateHardware(email, new HardwareInfo(), cancellationToken))
|
||||
await userService.UpdateHardware(email, cancellationToken: cancellationToken))
|
||||
.RequireAuthorization(apiAdminPolicy)
|
||||
.WithOpenApi(op => new OpenApiOperation(op){ Summary = "Resets hardware id in case of hardware change"});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user