Skip to content

Commit a18c164

Browse files
committed
Return no content if no result
1 parent 6dadca4 commit a18c164

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

App/Api/Setup/ApiEndpoints.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void ConfigureEndpoints(this WebApplication app)
3030
var result = await service.GetLongestDownwardTrend(fromDate, toDate);
3131
if (result is null)
3232
{
33-
return Results.NotFound();
33+
return Results.NoContent();
3434
}
3535
return Results.Ok(new LongestDownwardTrendResponse(result.Value));
3636
}
@@ -49,7 +49,7 @@ public static void ConfigureEndpoints(this WebApplication app)
4949
var result = await service.GetHighestTradingVolume(fromDate, toDate);
5050
if (result is null)
5151
{
52-
return Results.NotFound();
52+
return Results.NoContent();
5353
}
5454
return Results.Ok(new HighestTradingVolumeResponse
5555
(
@@ -72,7 +72,7 @@ public static void ConfigureEndpoints(this WebApplication app)
7272
var result = await service.GetBestBuyAndSellDates(fromDate, toDate);
7373
if (result is null)
7474
{
75-
return Results.NotFound();
75+
return Results.NoContent();
7676
}
7777
return Results.Ok(new BuyAndSellResponse
7878
(

0 commit comments

Comments
 (0)