namespace IOL.GreatOffice.Api.Endpoints;
public class EndpointBase : ControllerBase
{
///
/// User data for the currently logged on user.
///
protected LoggedInUserModel LoggedInUser => new() {
Username = User.FindFirstValue(AppClaims.NAME),
Id = User.FindFirstValue(AppClaims.USER_ID).AsGuid(),
};
public ActionResult KnownProblem(string title = default, string subtitle = default, Dictionary errors = default) {
return BadRequest(new KnownProblemModel {
Title = title,
Subtitle = subtitle,
Errors = errors,
TraceId = HttpContext.TraceIdentifier
});
}
}