public async Task <IActionResult> AddSe2StockMonthRevenue(string startDate, string endDate) { try { List <string> errorYearMonth = new List <string>(); var dateList = Extensions.GetBetweenYearMonths(startDate, endDate); foreach (var date in dateList) { errorYearMonth.Add(await _stockService.AddSe2StockMonthRevenue(date)); } return(Ok(errorYearMonth)); } catch (Exception ex) { return(StatusCode(500, $"Internal server error: {ex}.")); } }