feat(backend): allow suspended users to access some endpoints, add flag scopes
This commit is contained in:
parent
7f8e72e857
commit
5cb3faa92b
7 changed files with 57 additions and 25 deletions
|
@ -66,9 +66,11 @@ builder
|
|||
})
|
||||
.ConfigureApiBehaviorOptions(options =>
|
||||
{
|
||||
options.InvalidModelStateResponseFactory = actionContext => new BadRequestObjectResult(
|
||||
new ApiError.AspBadRequest("Bad request", actionContext.ModelState).ToJson()
|
||||
);
|
||||
// the type isn't needed but without it, rider keeps complaining for no reason (it compiles just fine)
|
||||
options.InvalidModelStateResponseFactory = (ActionContext actionContext) =>
|
||||
new BadRequestObjectResult(
|
||||
new ApiError.AspBadRequest("Bad request", actionContext.ModelState).ToJson()
|
||||
);
|
||||
});
|
||||
|
||||
builder.Services.AddOpenApi(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue