Ejemplo n.º 1
0
 public AuthController(IMapper mapper, UserManager <AppUser> userManager, RoleManager <Role> roleManager,
                       IConfiguration configuration, IOptions <JwtSettings> jwtSettings, CyberSoldierContext dbContext,
                       IOptions <SuperUser> superUser, IConvertErrorToCodeService convertErrorToCode, IEmailSender emailSender)
 {
     _mapper             = mapper;
     _userManager        = userManager;
     _roleManager        = roleManager;
     _configuration      = configuration;
     _dbContext          = dbContext;
     _convertErrorToCode = convertErrorToCode;
     _emailSender        = emailSender;
     _superUser          = superUser.Value;
     _jwtSettings        = jwtSettings.Value;
 }
Ejemplo n.º 2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CyberSoldierContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            context.Database.Migrate();

            app.UseRouting();
            app.UseAuth();

            app.UseEndpoints(endpoints => { endpoints.MapControllers(); });

            app.UseSwagger();
            app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "MyAPI"); });
        }
 public DungeonController(CyberSoldierContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
Ejemplo n.º 4
0
 public BaseModelController(CyberSoldierContext dbContext)
 {
     _dbContext = dbContext;
 }
 public AttackItemController(IMapper mapper, CyberSoldierContext db)
 {
     _mapper = mapper;
     _db     = db;
 }
 public DefenceItemController(IMapper mapper, CyberSoldierContext dbContext)
 {
     _mapper    = mapper;
     _dbContext = dbContext;
 }
 public PlayerController(CyberSoldierContext dbContext, IMapper mapper, UserManager <AppUser> userManager)
 {
     _dbContext   = dbContext;
     _mapper      = mapper;
     _userManager = userManager;
 }
Ejemplo n.º 8
0
 public WorldController(CyberSoldierContext dbContext, IMapper mapper)
 {
     _dbContext = dbContext;
     _mapper    = mapper;
 }
Ejemplo n.º 9
0
 public CpuController(IMapper mapper, CyberSoldierContext dbContext)
 {
     _mapper    = mapper;
     _dbContext = dbContext;
 }