public IActionResult SetActivePOS([FromBody] MigrationDateRange migrationDateRange) { try { repository.SetActivePOS(); return(Ok("MERGE COMPLETE")); } catch (Exception ex) { logger.LogError(ex.GetExceptionMessages()); return(StatusCode(StatusCodes.Status500InternalServerError, Constants.ErrorMessages.FetchError)); } }
public IActionResult MigrateOldDb([FromBody] MigrationDateRange migrationDateRange) { try { if (migrationDateRange.DtFrom == null || migrationDateRange.DtTo == null) { return (BadRequest("Invalid")); } repository.MigrateOldDb(migrationDateRange.DtFrom.Value, migrationDateRange.DtTo.Value); return(Ok("MERGE COMPLETE")); } catch (Exception ex) { logger.LogError(ex.GetExceptionMessages()); return(StatusCode(StatusCodes.Status500InternalServerError, Constants.ErrorMessages.FetchError)); } }