예제 #1
0
 public EventsController(Arma3EventContext context, IAuthorizationService auth, PersistService persist, IApiTacMaps tacMaps, IMapInfosService mapInfos, IConfiguration config)
 {
     _context  = context;
     _auth     = auth;
     _persist  = persist;
     _tacMaps  = tacMaps;
     _mapInfos = mapInfos;
     _config   = config;
 }
예제 #2
0
        internal static async Task <User> GetUser(Arma3EventContext context, ClaimsPrincipal user)
        {
            if (user?.Identity?.IsAuthenticated ?? false)
            {
                var idClaim = user.FindFirst(UserIdClaim);
                if (idClaim != null)
                {
                    var userId = int.Parse(idClaim.Value);
                    return(await context.Users.FirstOrDefaultAsync(u => u.UserID == userId));
                }

                var steamId = GetSteamId(user);
                if (steamId != null)
                {
                    return(await context.Users.FirstOrDefaultAsync(u => u.SteamId == steamId));
                }
            }
            return(null);
        }
예제 #3
0
 public HomeController(ILogger <HomeController> logger, Arma3EventContext context, IApiTacMaps tacMaps)
 {
     _logger  = logger;
     _context = context;
     _tacMaps = tacMaps;
 }
예제 #4
0
 public AdminNewsController(Arma3EventContext context)
 {
     _context = context;
 }
예제 #5
0
 public AdminVideosController(Arma3EventContext context, IHttpClientFactory clientFactory)
 {
     _context       = context;
     _clientFactory = clientFactory;
 }
예제 #6
0
 public AdminContentBlocksController(Arma3EventContext context)
 {
     _context = context;
 }
예제 #7
0
 public AdminFactionsController(Arma3EventContext context)
 {
     _context = context;
 }
 public AdminMatchTechnicalInfosController(Arma3EventContext context)
 {
     _context = context;
 }
 public AdminMatchUsersController(Arma3EventContext context)
 {
     _context = context;
 }
예제 #10
0
 public VideosController(Arma3EventContext context)
 {
     _context = context;
 }
예제 #11
0
 public ApiEventsController(Arma3EventContext context, IApiTacMaps tacMaps)
 {
     _context = context;
     _tacMaps = tacMaps;
 }
예제 #12
0
 public UsersController(Arma3EventContext context)
 {
     _context = context;
 }
예제 #13
0
 public AdminMatchsController(Arma3EventContext context, IApiTacMaps tacMaps, IMapInfosService mapInfos)
 {
     _context  = context;
     _tacMaps  = tacMaps;
     _mapInfos = mapInfos;
 }
예제 #14
0
 public AdminReviewPersistController(Arma3EventContext context, IConfiguration config, PersistService persist)
 {
     _context = context;
     _config  = config;
     _persist = persist;
 }
예제 #15
0
 public AuthenticationController(Arma3EventContext context)
 {
     _context = context;
 }
예제 #16
0
 public AdminSquadsController(Arma3EventContext context)
 {
     _context = context;
 }
예제 #17
0
 public AdminDocumentsController(Arma3EventContext context)
 {
     _context = context;
 }