This commit is contained in:
2020-04-05 20:38:08 +00:00
parent 0692b54c11
commit e367b4b132
3 changed files with 5 additions and 12 deletions

View File

@@ -72,7 +72,7 @@ namespace AyaNova.Api.ControllerHelpers
//Here we will likely need to trigger a notification to users if the state is going to be shutting down or is shut down
_priorState = _currentState;//keep the prior state so it can be resumed easily
_priorReason=_reason;//keep the original reason
_priorReason = _reason;//keep the original reason
_currentState = newState;
}
@@ -100,7 +100,10 @@ namespace AyaNova.Api.ControllerHelpers
}
else
{
return $"Server state is: {_currentState.ToString()}, Reason: {_reason}";
if (_currentState == ServerState.Closed)
return $"{ AyaNova.Biz.TranslationBiz.GetDefaultTranslationAsync("ErrorAPI2000").Result}\r\n{_reason}";
else //opsonly
return $"{ AyaNova.Biz.TranslationBiz.GetDefaultTranslationAsync("ErrorAPI2001").Result}\r\n{_reason}";
}
}
}