fix bug more logging fix logging wtf is going on even handle lists in config log output do not set "*" as default continent do not rely on "*" being present in configuration when picking file shard
18 lines
596 B
C#
18 lines
596 B
C#
using MareSynchronosShared.Utils;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace MareSynchronosStaticFilesServer.Controllers;
|
|
|
|
public class ControllerBase : Controller
|
|
{
|
|
protected ILogger _logger;
|
|
|
|
public ControllerBase(ILogger logger)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
protected string MareUser => HttpContext.User.Claims.First(f => string.Equals(f.Type, MareClaimTypes.Uid, StringComparison.Ordinal)).Value;
|
|
protected string Continent => HttpContext.User.Claims.FirstOrDefault(f => string.Equals(f.Type, MareClaimTypes.Continent, StringComparison.Ordinal))?.Value ?? "*";
|
|
}
|