This commit is contained in:
15
server/AyaNova/ControllerHelpers/LocaleIdFromContext.cs
Normal file
15
server/AyaNova/ControllerHelpers/LocaleIdFromContext.cs
Normal 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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user