Exemple #1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var model  = new SiteNotification();
            var result = await _service.GetPushNotificationSettingsAsync();

            if (result.Data != null)
            {
                model.notification_id = result.Data.notification_id;
                model.iphone_key      = result.Data.iphone_key;
                model.android_key     = result.Data.android_key;
                model.send_url        = result.Data.send_url;
                //model.is_active = result.Data.is_active;
                //model.is_status = (result.Data.is_active == 1 ? true : false);
            }

            return(await Task.FromResult((IViewComponentResult)View("Default", model)));
        }