Exemple #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;
        }
Exemple #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;
 }
        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;
        }
Exemple #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;
 }
Exemple #6
0
 public ChannelController(
     StargateDbContext dbContext,
     CoreApiService coreApiService)
 {
     _dbContext      = dbContext;
     _coreApiService = coreApiService;
 }
Exemple #7
0
 public MessageController(
     StargateDbContext dbContext,
     Counter counter,
     CoreApiService coreApiService)
 {
     _dbContext      = dbContext;
     _counter        = counter;
     _coreApiService = coreApiService;
 }
Exemple #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);
        }
Exemple #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);
        }
Exemple #10
0
 public ApiController(
     OSSDbContext dbContext,
     ImageCompresser imageCompresser,
     IConfiguration configuration,
     ServiceLocation serviceLocation,
     CoreApiService coreApiService)
 {
     _dbContext       = dbContext;
     _imageCompresser = imageCompresser;
     _configuration   = configuration;
     _serviceLocation = serviceLocation;
     _coreApiService  = coreApiService;
 }
Exemple #11
0
 public MessageController(
     StargateDbContext dbContext,
     StargateMemory memoryContext,
     Counter counter,
     CoreApiService coreApiService,
     ACTokenManager tokenManager)
 {
     _dbContext      = dbContext;
     _memoryContext  = memoryContext;
     _counter        = counter;
     _coreApiService = coreApiService;
     _tokenManager   = tokenManager;
 }
Exemple #12
0
 public AppsController(
     DeveloperDbContext dbContext,
     AppsContainer appsContainer,
     CoreApiService coreApiService,
     SitesService siteService,
     EventService eventService)
 {
     _dbContext      = dbContext;
     _appsContainer  = appsContainer;
     _coreApiService = coreApiService;
     _siteService    = siteService;
     _eventService   = eventService;
 }
Exemple #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);
        }
Exemple #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;
        }
        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;
        }
Exemple #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;
        }
Exemple #17
0
 public TodoController(
     CoreApiService coreApiService)
 {
     _coreApiService = coreApiService;
 }
Exemple #18
0
 public IndexModel(
     CoreApiService coreApiService)
 {
     _coreApiService = coreApiService;
 }