Ejemplo n.º 1
0
        public SliExportController(
            SliExportSettings sliExportSettings,
            ISettingService settingService,
            ILocalizationService localizationService,
            INotificationService notificationService
            )
        {
            _sliExportSettings   = sliExportSettings;
            _settingService      = settingService;
            _localizationService = localizationService;
            _notificationService = notificationService;

            return;
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Configure(SliExportModel model)
        {
            if (!ModelState.IsValid)
            {
                return(Configure());
            }

            await _settingService.SaveSettingAsync(SliExportSettings.FromModel(model));

            _notificationService.SuccessNotification(
                await _localizationService.GetResourceAsync("Admin.Plugins.Saved")
                );

            return(Configure());
        }