diff --git a/src/ReC.API/Controllers/OutResController.cs b/src/ReC.API/Controllers/OutResController.cs
index 1c90266..0a6390f 100644
--- a/src/ReC.API/Controllers/OutResController.cs
+++ b/src/ReC.API/Controllers/OutResController.cs
@@ -1,6 +1,7 @@
using MediatR;
using Microsoft.AspNetCore.Mvc;
using ReC.API.Extensions;
+using ReC.API.Models;
using ReC.Application.OutResults.Commands;
using ReC.Application.OutResults.Queries;
@@ -38,7 +39,7 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr
///
/// The ID of the action to retrieve the result for.
/// A token to cancel the operation.
- /// Specifies which part of the result to return (Full, Header, or Body).
+ /// Specifies which part of the result to return (Full, OnlyHeader, or OnlyBody).
/// The requested output result or a part of it (header/body).
[HttpGet("fake/{actionId}")]
[ProducesResponseType(StatusCodes.Status200OK)]
@@ -52,8 +53,8 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr
return resultType switch
{
- ResultType.Body => res.Body is null ? NotFound() : Ok(res.Body.JsonToDynamic()),
- ResultType.Header => res.Header is null ? NotFound() : Ok(res.Header.JsonToDynamic()),
+ ResultType.OnlyBody => res.Body is null ? NotFound() : Ok(res.Body.JsonToDynamic()),
+ ResultType.OnlyHeader => res.Header is null ? NotFound() : Ok(res.Header.JsonToDynamic()),
_ => Ok(res),
};
}
@@ -85,23 +86,4 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr
await mediator.Send(new DeleteOutResCommand() { ProfileId = config.GetFakeProfileId() }, cancel);
return NoContent();
}
-}
-
-///
-/// Defines the type of result to be returned from an output result query.
-///
-public enum ResultType
-{
- ///
- /// Return the full result object.
- ///
- Full,
- ///
- /// Return only the header part of the result.
- ///
- Header,
- ///
- /// Return only the body part of the result.
- ///
- Body
-}
+}
\ No newline at end of file
diff --git a/src/ReC.API/Controllers/ResultViewController.cs b/src/ReC.API/Controllers/ResultViewController.cs
index b28a570..84cc4e9 100644
--- a/src/ReC.API/Controllers/ResultViewController.cs
+++ b/src/ReC.API/Controllers/ResultViewController.cs
@@ -1,6 +1,7 @@
using MediatR;
using Microsoft.AspNetCore.Mvc;
using ReC.API.Extensions;
+using ReC.API.Models;
using ReC.Application.ResultViews.Queries;
namespace ReC.API.Controllers;
@@ -32,8 +33,8 @@ public class ResultViewController(IMediator mediator, IConfiguration config) : C
return resultType switch
{
- ResultType.Body => res.Body is null ? NotFound() : Ok(res.Body.JsonToDynamic()),
- ResultType.Header => res.Header is null ? NotFound() : Ok(res.Header.JsonToDynamic()),
+ ResultType.OnlyBody => res.Body is null ? NotFound() : Ok(res.Body.JsonToDynamic()),
+ ResultType.OnlyHeader => res.Header is null ? NotFound() : Ok(res.Header.JsonToDynamic()),
_ => Ok(res),
};
}
diff --git a/src/ReC.API/Models/ResultType.cs b/src/ReC.API/Models/ResultType.cs
new file mode 100644
index 0000000..15751c9
--- /dev/null
+++ b/src/ReC.API/Models/ResultType.cs
@@ -0,0 +1,17 @@
+namespace ReC.API.Models;
+
+public enum ResultType
+{
+ ///
+ /// Return the full result object.
+ ///
+ Full,
+ ///
+ /// Return only the header part of the result.
+ ///
+ OnlyHeader,
+ ///
+ /// Return only the body part of the result.
+ ///
+ OnlyBody
+}
\ No newline at end of file