Exemplo n.º 1
0
        public async Task SubmitAsync()
        {
            if (!ValidateUrls())
            {
                await Page.DisplayAlert(AppResources.AnErrorHasOccurred, AppResources.EnvironmentPageUrlsError, AppResources.Ok);

                return;
            }

            var resUrls = await _environmentService.SetUrlsAsync(new Core.Models.Data.EnvironmentUrlData
            {
                Base          = BaseUrl,
                Api           = ApiUrl,
                Identity      = IdentityUrl,
                WebVault      = WebVaultUrl,
                Icons         = IconsUrl,
                Notifications = NotificationsUrls
            });

            // re-set urls since service can change them, ex: prefixing https://
            BaseUrl           = resUrls.Base;
            WebVaultUrl       = resUrls.WebVault;
            ApiUrl            = resUrls.Api;
            IdentityUrl       = resUrls.Identity;
            IconsUrl          = resUrls.Icons;
            NotificationsUrls = resUrls.Notifications;

            SubmitSuccessAction?.Invoke();
        }
Exemplo n.º 2
0
        public async Task SubmitAsync()
        {
            var resUrls = await _environmentService.SetUrlsAsync(new Core.Models.Data.EnvironmentUrlData
            {
                Base          = BaseUrl,
                Api           = ApiUrl,
                Identity      = IdentityUrl,
                WebVault      = WebVaultUrl,
                Icons         = IconsUrl,
                Notifications = NotificationsUrls
            });

            // re-set urls since service can change them, ex: prefixing https://
            BaseUrl           = resUrls.Base;
            WebVaultUrl       = resUrls.WebVault;
            ApiUrl            = resUrls.Api;
            IdentityUrl       = resUrls.Identity;
            IconsUrl          = resUrls.Icons;
            NotificationsUrls = resUrls.Notifications;

            SubmitSuccessAction?.Invoke();
        }