예제 #1
0
        public async Task Recover(
            DeveloperUser user,
            DeveloperApp appInDb,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService,
            ChannelService channelService,
            RecordsService recordsService,
            int pageNumber)
        {
            RootRecover(user);
            var token = await appsContainer.AccessToken(appInDb.AppId, appInDb.AppSecret);

            Grants = await coreApiService.AllUserGrantedAsync(token, pageNumber, 15);

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;

            var errorLogs = await eventService.ViewAsync(token);

            ErrorLogs = errorLogs.Logs;

            var channels = await channelService.ViewMyChannelsAsync(token);

            Channels = channels.Channels;

            var records = await recordsService.ViewMyRecordsAsync(token, Array.Empty <string>());

            Records = records.Records;

            Trusted = appInDb.TrustedApp;
        }
예제 #2
0
 public SecretController(
     OSSDbContext dbContext,
     CoreApiService coreApiService)
 {
     _dbContext      = dbContext;
     _coreApiService = coreApiService;
 }
 public AdminOperationsController(ApplicationDbContext _db, CoreApiService _coreApiService, GeoService _geoSrv, AuthHelperService _authSrv)
 {
     db             = _db;
     coreApiService = _coreApiService;
     geoSrv         = _geoSrv;
     authSrv        = _authSrv;
 }
예제 #4
0
        public async Task Recover(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService,
            ChannelService channelService,
            int pageNumber)
        {
            RootRecover(user);
            var token = await appsContainer.AccessToken(thisApp.AppId, thisApp.AppSecret);

            Grants = await coreApiService.AllUserGrantedAsync(token, pageNumber, 15);

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;

            var errorLogs = await eventService.ViewAsync(token);

            ErrorLogs = errorLogs.Logs;

            var channels = await channelService.ViewMyChannelsAsync(token);

            Channels = channels.Channels;
        }
예제 #5
0
 public AppsController(
     UserManager <DeveloperUser> userManager,
     SignInManager <DeveloperUser> signInManager,
     ILoggerFactory loggerFactory,
     DeveloperDbContext dbContext,
     ServiceLocation serviceLocation,
     StorageService storageService,
     OSSApiService ossApiService,
     AppsContainer appsContainer,
     CoreApiService coreApiService,
     IConfiguration configuration,
     SitesService siteService)
 {
     _userManager     = userManager;
     _signInManager   = signInManager;
     _logger          = loggerFactory.CreateLogger <AppsController>();
     _dbContext       = dbContext;
     _serviceLocation = serviceLocation;
     _storageService  = storageService;
     _ossApiService   = ossApiService;
     _appsContainer   = appsContainer;
     _coreApiService  = coreApiService;
     _configuration   = configuration;
     _siteService     = siteService;
 }
예제 #6
0
 public ChannelController(
     StargateDbContext dbContext,
     CoreApiService coreApiService)
 {
     _dbContext      = dbContext;
     _coreApiService = coreApiService;
 }
예제 #7
0
 public MessageController(
     StargateDbContext dbContext,
     Counter counter,
     CoreApiService coreApiService)
 {
     _dbContext      = dbContext;
     _counter        = counter;
     _coreApiService = coreApiService;
 }
예제 #8
0
        public static async Task <ViewAppViewModel> SelfCreateAsync(
            DeveloperUser User,
            App ThisApp,
            CoreApiService coreApiService,
            OSSApiService ossApiService,
            AppsContainer appsContainer)
        {
            var model = new ViewAppViewModel(User, ThisApp);
            await model.Recover(User, ThisApp, coreApiService, ossApiService, appsContainer);

            return(model);
        }
예제 #9
0
        public static async Task <ViewAppViewModel> SelfCreateAsync(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService)
        {
            var model = new ViewAppViewModel(user, thisApp);
            await model.Recover(user, thisApp, coreApiService, appsContainer, sitesService, eventService);

            return(model);
        }
예제 #10
0
 public ApiController(
     OSSDbContext dbContext,
     ImageCompresser imageCompresser,
     IConfiguration configuration,
     ServiceLocation serviceLocation,
     CoreApiService coreApiService)
 {
     _dbContext       = dbContext;
     _imageCompresser = imageCompresser;
     _configuration   = configuration;
     _serviceLocation = serviceLocation;
     _coreApiService  = coreApiService;
 }
예제 #11
0
 public MessageController(
     StargateDbContext dbContext,
     StargateMemory memoryContext,
     Counter counter,
     CoreApiService coreApiService,
     ACTokenManager tokenManager)
 {
     _dbContext      = dbContext;
     _memoryContext  = memoryContext;
     _counter        = counter;
     _coreApiService = coreApiService;
     _tokenManager   = tokenManager;
 }
예제 #12
0
 public AppsController(
     DeveloperDbContext dbContext,
     AppsContainer appsContainer,
     CoreApiService coreApiService,
     SitesService siteService,
     EventService eventService)
 {
     _dbContext      = dbContext;
     _appsContainer  = appsContainer;
     _coreApiService = coreApiService;
     _siteService    = siteService;
     _eventService   = eventService;
 }
예제 #13
0
        public static async Task <ViewAppViewModel> SelfCreateAsync(
            DeveloperUser user,
            DeveloperApp appInDb,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService,
            ChannelService channelService,
            int pageNumber)
        {
            var model = new ViewAppViewModel(user, appInDb);
            await model.Recover(user, appInDb, coreApiService, appsContainer, sitesService, eventService, channelService, pageNumber);

            return(model);
        }
예제 #14
0
        public async Task Recover(
            DeveloperUser User,
            App ThisApp,
            CoreApiService coreApiService,
            OSSApiService ossApiService,
            AppsContainer appsContainer)
        {
            base.Recover(User, 1);
            var token = await appsContainer.AccessToken(ThisApp.AppId, ThisApp.AppSecret);

            var buckets = await ossApiService.ViewMyBucketsAsync(token);

            Buckets = buckets.Buckets;

            var grants = await coreApiService.AllUserGrantedAsync(token);

            Grants = grants.Grants;
        }
예제 #15
0
        public async Task Recover(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            OSSApiService ossApiService,
            AppsContainer appsContainer,
            SitesService sitesService)
        {
            base.RootRecover(user, 1);
            var token = await appsContainer.AccessToken(thisApp.AppId, thisApp.AppSecret);

            var buckets = await ossApiService.ViewMyBucketsAsync(token);

            Buckets = buckets.Buckets;

            var grants = await coreApiService.AllUserGrantedAsync(token);

            Grants = grants.Grants;

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;
        }
예제 #16
0
        public async Task Recover(
            DeveloperUser user,
            App thisApp,
            CoreApiService coreApiService,
            AppsContainer appsContainer,
            SitesService sitesService,
            EventService eventService)
        {
            RootRecover(user);
            var token = await appsContainer.AccessToken(thisApp.AppId, thisApp.AppSecret);


            var grants = await coreApiService.AllUserGrantedAsync(token);

            Grants = grants.Grants;

            var sites = await sitesService.ViewMySitesAsync(token);

            Sites = sites.Sites;

            var errorLogs = await eventService.ViewAsync(token);

            ErrorLogs = errorLogs.Logs;
        }
예제 #17
0
 public TodoController(
     CoreApiService coreApiService)
 {
     _coreApiService = coreApiService;
 }
예제 #18
0
 public IndexModel(
     CoreApiService coreApiService)
 {
     _coreApiService = coreApiService;
 }