This commit is contained in:
15
server/ControllerHelpers/UserTranslationIdFromContext.cs
Normal file
15
server/ControllerHelpers/UserTranslationIdFromContext.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Sockeye.Api.ControllerHelpers
|
||||
{
|
||||
internal static class UserTranslationIdFromContext
|
||||
{
|
||||
internal static long Id(IDictionary<object, object> HttpContextItems)
|
||||
{
|
||||
long? l = (long?)HttpContextItems["AY_TRANSLATION_ID"];
|
||||
if (l == null)
|
||||
return Sockeye.Util.ServerBootConfig.SOCKEYE_DEFAULT_TRANSLATION_ID;
|
||||
return (long)l;
|
||||
}
|
||||
}
|
||||
}//eons
|
||||
Reference in New Issue
Block a user