in .NET 8, in a project with a minimal API, is it possible to set status codes, for example, 401 Unauthorized, on all endpoints with a single call to a method, for example:
app.MapGroup("test").Produces(StatusCodes.Status401Unauthorized);
Or do I have to do it for each endpoint like this:
app.MapGet("....", () => "Hello World!").Produces(StatusCodes.Status401Unauthorized);
Thanks