diff --git a/devdocs/specs/core-server-state.txt b/devdocs/specs/core-server-state.txt index 284f40f6..9d48881b 100644 --- a/devdocs/specs/core-server-state.txt +++ b/devdocs/specs/core-server-state.txt @@ -19,9 +19,6 @@ Closed or Open States - All non-ops routes will need to see if closed and server state returns closed both if serverstate is closed or if SYSTEM_LOCK - - - Some scenarios at the server require general users to be LOCKED OUT COMPLETELY but still grant limited access for operations administration, such as: - Biz changes that need all users out such as a re-org of client data or something else business related - Ops changes that need all users out such as upgrades, backup, restore, any mass data change such as import or export diff --git a/server/AyaNova/ControllerHelpers/ApiServerState.cs b/server/AyaNova/ControllerHelpers/ApiServerState.cs index 69c5d07a..0e33c5d8 100644 --- a/server/AyaNova/ControllerHelpers/ApiServerState.cs +++ b/server/AyaNova/ControllerHelpers/ApiServerState.cs @@ -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}"; } } } diff --git a/server/AyaNova/biz/ApiErrorCode.cs b/server/AyaNova/biz/ApiErrorCode.cs index e2b41de8..99230e21 100644 --- a/server/AyaNova/biz/ApiErrorCode.cs +++ b/server/AyaNova/biz/ApiErrorCode.cs @@ -1,10 +1,3 @@ -using System; -using Microsoft.Extensions.Logging; -using AyaNova.Models; -using System.Linq; -using System.Collections.Generic; - - namespace AyaNova.Biz {