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

@@ -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 - 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: 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 - 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 - Ops changes that need all users out such as upgrades, backup, restore, any mass data change such as import or export

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 //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 _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; _currentState = newState;
} }
@@ -100,7 +100,10 @@ namespace AyaNova.Api.ControllerHelpers
} }
else 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}";
} }
} }
} }

View File

@@ -1,10 +1,3 @@
using System;
using Microsoft.Extensions.Logging;
using AyaNova.Models;
using System.Linq;
using System.Collections.Generic;
namespace AyaNova.Biz namespace AyaNova.Biz
{ {