Skip to content

Commit 5e8f5b2

Browse files
committed
Fix accessing tuple values
1 parent 0597ff5 commit 5e8f5b2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

App/Api/Setup/ApiEndpoints.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Asp.Versioning;
33
using Microsoft.OpenApi.Any;
44
using Services;
5+
using System;
56

67
namespace Api.Setup;
78

@@ -56,8 +57,8 @@ public static void ConfigureEndpoints(this WebApplication app)
5657
}
5758
return Results.Ok(new
5859
{
59-
result?.Date,
60-
result?.Volume,
60+
result.Value.Date,
61+
result.Value.Volume,
6162
});
6263
}
6364
catch (HttpRequestException ex)
@@ -79,8 +80,8 @@ public static void ConfigureEndpoints(this WebApplication app)
7980
}
8081
return Results.Ok(new
8182
{
82-
result?.SellDate,
83-
result?.BuyDate,
83+
result.Value.SellDate,
84+
result.Value.BuyDate,
8485
});
8586
}
8687
catch (HttpRequestException ex)

0 commit comments

Comments
 (0)