mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 11:16:33 +00:00
small fixes
This commit is contained in:
@@ -105,18 +105,17 @@ app.MapPost("/users",
|
||||
.WithOpenApi(op => new(op){ Summary = "Creates a new user"});
|
||||
|
||||
app.MapGet("/users",
|
||||
async (string searchEmail, RoleEnum? searchRole, IUserService userService, CancellationToken cancellationToken)
|
||||
async (string? searchEmail, RoleEnum? searchRole, IUserService userService, CancellationToken cancellationToken)
|
||||
=> await userService.GetUsers(searchEmail, searchRole, cancellationToken))
|
||||
.RequireAuthorization(apiAdminPolicy)
|
||||
.WithOpenApi(op => new(op){ Summary = "Lists all users"});
|
||||
.WithOpenApi(op => new(op){ Summary = "List users by criteria"});
|
||||
|
||||
app.MapPost("/resources",
|
||||
async (ResourceEnum resourceEnum, IFormFile data, IResourcesService resourceService, CancellationToken cancellationToken)
|
||||
=> await resourceService.SaveResource(resourceEnum, data, cancellationToken))
|
||||
.Accepts<IFormFile>("multipart/form-data")
|
||||
.RequireAuthorization(apiAdminPolicy)
|
||||
.DisableAntiforgery()
|
||||
.WithOpenApi(op => new(op){ Summary = "Uploads / Replace existing resource by type"});
|
||||
.DisableAntiforgery();
|
||||
|
||||
app.MapPost("/resources/get", //Need to have POST method for secure password
|
||||
async ([FromBody]GetResourceRequest request, IAuthService authService, IUserService userService, IResourcesService resourcesService, CancellationToken cancellationToken) =>
|
||||
|
||||
@@ -18,24 +18,6 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7139;http://localhost:5219",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user