Added Conditional OperationalResponse constructor.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-11-19 13:04:40 -07:00
parent f629834d6a
commit 03b9331a9a
11 changed files with 65 additions and 128 deletions

View File

@@ -493,7 +493,7 @@ namespace CarCareTracker.Controllers
}
if (translationsDownloaded > 0)
{
return Json(new OperationResponse() { Success = true, Message = $"{translationsDownloaded} Translations Downloaded" });
return Json(OperationResponse.Succeed($"{translationsDownloaded} Translations Downloaded"));
} else
{
return Json(OperationResponse.Failed("No Translations Downloaded"));