Skip to content

Commit

Permalink
Removed minimal api-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
roar-andersen committed Jan 13, 2025
1 parent ac1d122 commit 831f044
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WrapThat.Version/WebApplicationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public static WebApplication MapVersionApiEndpoints(this WebApplication app)
return app;
}

private static ActionResult<string> HandleRequest(Func<InfoController, ActionResult<string>> action)
private static object? HandleRequest<T>(Func<InfoController, ActionResult<T>> action)
{
var controller = new InfoController();
var actionResult = action(controller);
return actionResult as ActionResult<string>;
var actionResult = action(controller).Result as OkObjectResult;
return actionResult!.Value;
}
}

0 comments on commit 831f044

Please sign in to comment.