diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-09-11 17:47:01 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-11 17:47:01 -0600 |
| commit | d2e18547b16fa30684d7c9ceb8a117d5d9bcef56 (patch) | |
| tree | f488c8148f28059f0f39b0f98ba5ad4a4548f98a /Jellyfin.Api/Results | |
| parent | 01b6f7fea4bffd0e9e8cdb0828a4b9ba36136560 (diff) | |
Require properly typed ActionResult<T> (#8382)
Diffstat (limited to 'Jellyfin.Api/Results')
| -rw-r--r-- | Jellyfin.Api/Results/OkResultOfT.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Jellyfin.Api/Results/OkResultOfT.cs b/Jellyfin.Api/Results/OkResultOfT.cs new file mode 100644 index 000000000..f60cbbcee --- /dev/null +++ b/Jellyfin.Api/Results/OkResultOfT.cs @@ -0,0 +1,21 @@ +#pragma warning disable SA1649 // File name should match type name. + +using Microsoft.AspNetCore.Mvc; + +namespace Jellyfin.Api.Results; + +/// <summary> +/// Ok result with type specified. +/// </summary> +/// <typeparam name="T">The type to return.</typeparam> +public class OkResult<T> : OkObjectResult +{ + /// <summary> + /// Initializes a new instance of the <see cref="OkResult{T}"/> class. + /// </summary> + /// <param name="value">The value to return.</param> + public OkResult(T value) + : base(value) + { + } +} |
