Skip to content

Commit 562133a

Browse files
committed
rework return types on MVC actions
1 parent 7823869 commit 562133a

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/Server/Controllers/Api/v1/Admin/RefreshCacheController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class RefreshCacheController : ControllerBase
2525
[ProducesResponseType(StatusCodes.Status429TooManyRequests)]
2626
[ProducesResponseType(StatusCodes.Status202Accepted)]
2727
[SuppressMessage("ReSharper.DPA", "DPA0011: High execution time of MVC action")]
28-
public async Task<ActionResult<object>> Action([FromQuery] string rc)
28+
public async Task<ActionResult> Action([FromQuery] string rc)
2929
{
3030
if (!Meta.EndpointEnabled)
3131
return Problem("This instance of Ryubing UpdateServer is not configured to support this endpoint.",

src/Server/Controllers/Api/v1/VersionController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class VersionController : ControllerBase
1212
[ProducesResponseType(StatusCodes.Status404NotFound)]
1313
[ProducesResponseType(StatusCodes.Status200OK)]
1414
[Produces("application/json")]
15-
public async Task<ActionResult<object>> GetLatestStable(
15+
public async Task<ActionResult<VersionResponse>> GetLatestStable(
1616
[FromKeyedServices("stableCache")] VersionCache vcache,
1717
[FromQuery] string? os = null,
1818
[FromQuery] string? arch = null
@@ -42,7 +42,7 @@ public async Task<ActionResult<object>> GetLatestStable(
4242
[ProducesResponseType(StatusCodes.Status404NotFound)]
4343
[ProducesResponseType(StatusCodes.Status200OK)]
4444
[Produces("application/json")]
45-
public async Task<ActionResult<object>> GetLatestCanary(
45+
public async Task<ActionResult<VersionResponse>> GetLatestCanary(
4646
[FromKeyedServices("canaryCache")] VersionCache vcache,
4747
[FromQuery] string? os = null,
4848
[FromQuery] string? arch = null

src/Server/Controllers/DownloadController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class DownloadController : ControllerBase
1313
[ProducesResponseType(StatusCodes.Status302Found)]
1414
[ProducesResponseType(StatusCodes.Status404NotFound)]
1515
[ProducesResponseType(StatusCodes.Status400BadRequest)]
16-
public async Task<ActionResult<object>> DownloadCustom(
16+
public async Task<ActionResult> DownloadCustom(
1717
[FromQuery] string os,
1818
[FromQuery] string arch,
1919
[FromQuery] string rc = Constants.StableRoute,
@@ -54,7 +54,7 @@ public async Task<ActionResult<object>> DownloadCustom(
5454
[HttpGet(Constants.StableRoute)]
5555
[ProducesResponseType(StatusCodes.Status302Found)]
5656
[ProducesResponseType(StatusCodes.Status404NotFound)]
57-
public async Task<ActionResult<object>> DownloadLatestStable(
57+
public async Task<ActionResult> DownloadLatestStable(
5858
[FromKeyedServices("stableCache")] VersionCache vcache
5959
)
6060
{
@@ -80,7 +80,7 @@ public async Task<ActionResult<object>> DownloadLatestStable(
8080
[HttpGet(Constants.CanaryRoute)]
8181
[ProducesResponseType(StatusCodes.Status302Found)]
8282
[ProducesResponseType(StatusCodes.Status404NotFound)]
83-
public async Task<ActionResult<object>> DownloadLatestCanary(
83+
public async Task<ActionResult> DownloadLatestCanary(
8484
[FromKeyedServices("canaryCache")] VersionCache vcache
8585
)
8686
{

src/Server/Controllers/LatestController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class LatestController : ControllerBase
1212
[ProducesResponseType(StatusCodes.Status200OK)]
1313
[ProducesResponseType(StatusCodes.Status404NotFound)]
1414
[ProducesResponseType(StatusCodes.Status400BadRequest)]
15-
public async Task<ActionResult<object>> GetLatestCustom(
15+
public async Task<ActionResult<VersionResponse>> GetLatestCustom(
1616
[FromQuery] string? os,
1717
[FromQuery] string? arch,
1818
[FromQuery] string? rc = Constants.StableRoute

0 commit comments

Comments
 (0)