예제 #1
0
        public ActionResult Index(bool newToken = false)
        {
            var settings = this._settingsRepo.GetSetting();

            if (newToken)
            {
                settings.Token = _siteimproveHelper.RequestToken();
                this._settingsRepo.SaveToken(settings.Token, settings.NoRecheck);
            }

            var vm = new SettingsViewModel()
            {
                Token     = settings.Token,
                NoRecheck = settings.NoRecheck
            };

            return(View(_siteimproveHelper.GetAdminViewPath("Index"), vm));
        }
예제 #2
0
        public ActionResult Index(bool newToken = false)
        {
            if (newToken)
            {
                // Create new token
                this._settingsRepo.SaveToken(_siteimproveHelper.RequestToken());
            }

            return(View(_siteimproveHelper.GetAdminViewPath("Index"), this._settingsRepo.GetToken() as object));
        }
        public ActionResult Index(bool newToken = false)
        {
            var settings = this._settingsRepo.GetSetting();

            if (newToken)
            {
                settings.Token = _siteimproveHelper.RequestToken();
                this._settingsRepo.SaveToken(settings.Token, settings.NoRecheck, settings.ApiUser, settings.ApiKey);
            }

            var vm = new SettingsViewModel()
            {
                Token     = settings.Token,
                NoRecheck = settings.NoRecheck,
                ApiUser   = settings.ApiUser,
                ApiKey    = settings.ApiKey,
                PrepublishCheckEnabled = _siteimproveHelper.GetPrepublishCheckEnabled(settings.ApiUser, settings.ApiKey)
            };

            return(View(_siteimproveHelper.GetAdminViewPath("Index"), vm));
        }