This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -53,7 +53,7 @@
|
|||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
|
||||||
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
|
||||||
"AYANOVA_SERVER_TEST_MODE": "true",
|
"AYANOVA_SERVER_TEST_MODE": "false",
|
||||||
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
|
||||||
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
|
||||||
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_13\\bin\\"
|
||||||
|
|||||||
@@ -91,16 +91,21 @@ namespace AyaNova.Api.Controllers
|
|||||||
case ApiServerState.ServerState.Open:
|
case ApiServerState.ServerState.Open:
|
||||||
break;
|
break;
|
||||||
case ApiServerState.ServerState.MigrateMode:
|
case ApiServerState.ServerState.MigrateMode:
|
||||||
state.Reason += await TranslationBiz.GetTranslationStaticAsync("ServerStateLoginRestricted", TransId, ct) + " " + await TranslationBiz.GetTranslationStaticAsync("ServerStateMigrateMode", TransId, ct);
|
state.Reason += await TranslationBiz.GetTranslationStaticAsync("ServerStateLoginRestricted", TransId, ct) + ":\n" + await TranslationBiz.GetTranslationStaticAsync("ServerStateMigrateMode", TransId, ct);
|
||||||
break;
|
break;
|
||||||
case ApiServerState.ServerState.OpsOnly:
|
case ApiServerState.ServerState.OpsOnly:
|
||||||
state.Reason += await TranslationBiz.GetTranslationStaticAsync("ServerStateLoginRestricted", TransId, ct) + " " + await TranslationBiz.GetTranslationStaticAsync("ServerStateOps", TransId, ct);
|
state.Reason += await TranslationBiz.GetTranslationStaticAsync("ServerStateLoginRestricted", TransId, ct) + ":\n" + await TranslationBiz.GetTranslationStaticAsync("ServerStateOps", TransId, ct);
|
||||||
break;
|
break;
|
||||||
case ApiServerState.ServerState.Closed:
|
case ApiServerState.ServerState.Closed:
|
||||||
state.Reason += await TranslationBiz.GetTranslationStaticAsync("ServerStateLoginRestricted", TransId, ct) + " " + await TranslationBiz.GetTranslationStaticAsync("ErrorAPI2000", TransId, ct);
|
state.Reason += await TranslationBiz.GetTranslationStaticAsync("ServerStateLoginRestricted", TransId, ct) + ":\n" + await TranslationBiz.GetTranslationStaticAsync("ErrorAPI2000", TransId, ct);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (desiredState != ApiServerState.ServerState.OpsOnly)
|
||||||
|
state.Reason = await TranslationBiz.GetTranslationStaticAsync("ServerStateLoginRestricted", TransId, ct) + ":\n" + state.Reason;
|
||||||
|
}
|
||||||
|
|
||||||
serverState.SetState(desiredState, state.Reason);
|
serverState.SetState(desiredState, state.Reason);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user