This commit is contained in:
2018-09-19 00:00:30 +00:00
parent b45095a350
commit a9f60453c6
8 changed files with 64 additions and 32 deletions

View File

@@ -0,0 +1,15 @@
using System.Collections.Generic;
namespace AyaNova.Api.ControllerHelpers
{
internal static class LocaleIdFromContext
{
internal static long Id(IDictionary<object, object> HttpContextItems)
{
long? l = (long?)HttpContextItems["AY_LOCALE_ID"];
if (l == null)
return AyaNova.Util.ServerBootConfig.AYANOVA_DEFAULT_LANGUAGE_ID;
return (long)l;
}
}
}//eons

View File

@@ -1,10 +1,7 @@
using EnumsNET;
using System.Collections.Generic;
namespace AyaNova.Api.ControllerHelpers
{
internal static class UserIdFromContext
{
internal static long Id(IDictionary<object, object> HttpContextItems)
@@ -16,6 +13,4 @@ namespace AyaNova.Api.ControllerHelpers
return (long)l;
}
}
}//eons