refactor: save current workspace state including FinlyticAnalyzer fixes, FinlyticApp trade route alignment, and DTO audit documentation
This commit is contained in:
@@ -13,27 +13,6 @@ using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace FinlyticBackend.Controllers;
|
||||
|
||||
/// <summary>
|
||||
/// Response DTO for corporate calendar events (AOT-compliant).
|
||||
/// </summary>
|
||||
public record CalendarEventResponseDto(
|
||||
[property: JsonPropertyName("id")] string Id,
|
||||
[property: JsonPropertyName("symbol")] string Symbol,
|
||||
[property: JsonPropertyName("companyName")]
|
||||
string CompanyName,
|
||||
[property: JsonPropertyName("eventType")]
|
||||
string EventType,
|
||||
[property: JsonPropertyName("eventDate")]
|
||||
DateTime EventDate,
|
||||
[property: JsonPropertyName("date")] string Date,
|
||||
[property: JsonPropertyName("isin")] string Isin,
|
||||
[property: JsonPropertyName("ticker")] string Ticker,
|
||||
[property: JsonPropertyName("description")]
|
||||
string Description,
|
||||
[property: JsonPropertyName("details")]
|
||||
string Details,
|
||||
[property: JsonPropertyName("image")] string Image
|
||||
);
|
||||
|
||||
[ApiController]
|
||||
[Authorize]
|
||||
@@ -52,22 +31,26 @@ public class CalendarController : ControllerBase
|
||||
/// <summary>
|
||||
/// Retrieves corporate calendar events with optional filters.
|
||||
/// </summary>
|
||||
[HttpGet("events")]
|
||||
[HttpGet("events/{year:int?}/{month:int?}")]
|
||||
public async Task<IActionResult> GetCorporateCalendar(
|
||||
int? year = null,
|
||||
int? month = null,
|
||||
[FromQuery] string? category = null,
|
||||
[FromQuery] DateTime? date = null,
|
||||
[FromQuery] string? symbol = null,
|
||||
[FromQuery] string? isin = null)
|
||||
{
|
||||
string? activeSymbol = !string.IsNullOrWhiteSpace(symbol) ? symbol.Trim() : isin?.Trim();
|
||||
int targetYear = year ?? DateTime.UtcNow.Year;
|
||||
int targetMonth = month ?? DateTime.UtcNow.Month;
|
||||
|
||||
try
|
||||
{
|
||||
if (_mqttClient.IsConnected)
|
||||
{
|
||||
var rawEvents = await _mqttClient.SendRpcRequestAsync<List<CorporateEventDto>, EmptyRequest>(
|
||||
"events_GetAll",
|
||||
new EmptyRequest(),
|
||||
var rawEvents = await _mqttClient.SendRpcRequestAsync<List<CorporateEventDto>, GetEventsByMonthRequest>(
|
||||
"events_GetByMonth",
|
||||
new GetEventsByMonthRequest(targetYear, targetMonth),
|
||||
TimeSpan.FromSeconds(4)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user