This commit is contained in:
2020-07-07 18:17:05 +00:00
parent ceb3133e0e
commit 753e823cbd
6 changed files with 38 additions and 7 deletions

View File

@@ -174,7 +174,7 @@ namespace AyaNova
options.AddPolicy("CorsPolicy",
builder => builder.AllowAnyOrigin()
.AllowAnyMethod()
.AllowAnyHeader().SetPreflightMaxAge(TimeSpan.FromSeconds(600))
.AllowAnyHeader().SetPreflightMaxAge(TimeSpan.FromSeconds(600))
);
});
@@ -547,6 +547,11 @@ namespace AyaNova
_newLog.LogDebug("DB schema check");
AySchema.CheckAndUpdateAsync(dbContext, _newLog).Wait();
// #if (DEBUG)
// System.Diagnostics.Debugger.Log(1, "BOOT", "Startup.cs -> RE-PRIMING TRANSLATIONS");
// AyaNova.Biz.PrimeData.RePrimeTranslations().Wait();
// #endif
//Check database integrity
_newLog.LogDebug("DB integrity check");
DbUtil.CheckFingerPrintAsync(AySchema.EXPECTED_COLUMN_COUNT, AySchema.EXPECTED_INDEX_COUNT, _newLog).Wait();
@@ -583,7 +588,7 @@ namespace AyaNova
{
//to support html5 pushstate routing in spa
//this ensures that a refresh at the client will not 404 but rather force back to the index.html app page and then handled internally by the client
await next();
await next();
if (!context.Response.HasStarted && !context.Request.Path.Value.StartsWith("/api") && context.Request.Path.Value != "/docs" && context.Response.StatusCode == 404 && !Path.HasExtension(context.Request.Path.Value))
{
context.Request.Path = "/index.html";

View File

@@ -5,6 +5,8 @@ using Microsoft.Extensions.Logging;
using AyaNova.Util;
using AyaNova.Models;
using Microsoft.EntityFrameworkCore;
namespace AyaNova.Biz
{
@@ -38,6 +40,22 @@ namespace AyaNova.Biz
}
// //used during development so I don't need to keep installing licenses over and over
// //just to refresh the translations
// public static async Task RePrimeTranslations()
// {
// //delete all the translations
// using (AyContext ct = ServiceProviderProvider.DBContext)
// {
// await ct.Database.ExecuteSqlRawAsync("delete from atranslationitem;");
// await ct.Database.ExecuteSqlRawAsync("delete from atranslation;");
// }
// //replace
// await PrimeTranslations();
// }
/// <summary>
/// Prime the Translations
/// This may be called before there are any users on a fresh db boot

View File

@@ -1548,6 +1548,7 @@
"PageOfPageText": "{0}-{1} von {2}",
"Loading": "Wird geladen...",
"Tags": "Kategorien",
"Tag":"Tag",
"UserTypeServiceContractor": "Subunternehmer",
"AuthorizationRoles": "Autorisierungsrollen",
"AuthorizationRoleNoRole": "Keine Rolle",
@@ -1850,5 +1851,6 @@
"DeleteSelected": "Ausgewählte Elemente löschen",
"Event": "Veranstaltung",
"Extensions":"Erweiterungen",
"SelectedItems":"Ausgewählte Elemente"
"SelectedItems":"Ausgewählte Elemente",
"Remove":"Entfernen"
}

View File

@@ -1548,6 +1548,7 @@
"PageOfPageText": "{0}-{1} of {2}",
"Loading": "Loading...",
"Tags": "Tags",
"Tag":"Tag",
"UserTypeServiceContractor": "SubContractor user",
"AuthorizationRoles": "Authorization roles",
"AuthorizationRoleNoRole": "No role",
@@ -1850,5 +1851,6 @@
"DeleteSelected": "Delete selected items",
"Event": "Event",
"Extensions":"Extensions",
"SelectedItems":"Selected items"
"SelectedItems":"Selected items",
"Remove":"Remove"
}

View File

@@ -1548,6 +1548,7 @@
"PageOfPageText": "{0}-{1} de {2}",
"Loading": "Cargando...",
"Tags": "Etiquetas",
"Tag":"Etiqueta",
"UserTypeServiceContractor": "Subcontratista",
"AuthorizationRoles": "Roles de autorización",
"AuthorizationRoleNoRole": "Sin rol",
@@ -1850,5 +1851,6 @@
"DeleteSelected": "Eliminar elementos seleccionados",
"Event": "Evento",
"Extensions":"Extensiones",
"SelectedItems":"Elementos seleccionados"
"SelectedItems":"Elementos seleccionados",
"Remove":"Eliminar"
}

View File

@@ -1548,6 +1548,7 @@
"PageOfPageText": "{0}-{1} sur {2}",
"Loading": "Chargement...",
"Tags": "Balises",
"Tag":"Balise",
"UserTypeServiceContractor": "Sous-traitant",
"AuthorizationRoles": "Rôles d'autorisation",
"AuthorizationRoleNoRole": "Pas de rôle",
@@ -1849,6 +1850,7 @@
"MoveSelected": "Déplacer les éléments sélectionnés",
"DeleteSelected": "Supprimer les éléments sélectionnés",
"Event": "Un événement",
"Extensions":"Extensions",
"SelectedItems":"Éléments sélectionnés"
"Extensions": "Extensions",
"SelectedItems": "Éléments sélectionnés",
"Remove": "Retirer"
}