aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/Endpoints/EndpointBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'code/api/Endpoints/EndpointBase.cs')
-rw-r--r--code/api/Endpoints/EndpointBase.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/code/api/Endpoints/EndpointBase.cs b/code/api/Endpoints/EndpointBase.cs
index 320ce8d..b2773e1 100644
--- a/code/api/Endpoints/EndpointBase.cs
+++ b/code/api/Endpoints/EndpointBase.cs
@@ -1,26 +1,26 @@
-namespace I2R.Storage.Api.Endpoints;
+namespace Quality.Storage.Api.Endpoints;
[ApiController]
[Authorize]
public class EndpointBase : ControllerBase
{
- protected LoggedInUserModel LoggedInUser => new(User);
+ protected LoggedInUserModel LoggedInUser => new(User);
- [NonAction]
- protected ActionResult KnownProblem(string title = default, string subtitle = default, Dictionary<string, string[]> errors = default) {
- HttpContext.Response.Headers.Add(AppHeaders.IS_KNOWN_PROBLEM, "1");
- return BadRequest(new KnownProblemModel {
- Title = title,
- Subtitle = subtitle,
- Errors = errors,
- TraceId = HttpContext.TraceIdentifier
- });
- }
+ [NonAction]
+ protected ActionResult KnownProblem(string title = default, string subtitle = default, Dictionary<string, string[]> errors = default) {
+ HttpContext.Response.Headers.Append(AppHeaders.IS_KNOWN_PROBLEM, "1");
+ return BadRequest(new KnownProblemModel {
+ Title = title,
+ Subtitle = subtitle,
+ Errors = errors,
+ TraceId = HttpContext.TraceIdentifier
+ });
+ }
- [NonAction]
- protected ActionResult KnownProblem(KnownProblemModel problem) {
- HttpContext.Response.Headers.Add(AppHeaders.IS_KNOWN_PROBLEM, "1");
- problem.TraceId = HttpContext.TraceIdentifier;
- return BadRequest(problem);
- }
-} \ No newline at end of file
+ [NonAction]
+ protected ActionResult KnownProblem(KnownProblemModel problem) {
+ HttpContext.Response.Headers.Append(AppHeaders.IS_KNOWN_PROBLEM, "1");
+ problem.TraceId = HttpContext.TraceIdentifier;
+ return BadRequest(problem);
+ }
+}