Exemple #1
0
        private async Task OnUpdateTenantValidSubmitAsync(EditContext editContext)
        {
            try
            {
                var myTenant = await MyTenantService.UpdateTenantAsync(tenantSettingsForm.Model.Map <MyTenantRequest>());

                toastService.ShowSuccess("Tenant settings updated.", "SUCCESS");
                savedCustomDomain = myTenant.CustomDomain;
                tenantSettingsForm.Model.CustomDomain         = myTenant.CustomDomain;
                tenantSettingsForm.Model.CustomDomainVerified = myTenant.CustomDomainVerified;
                RouteBindingLogic.SetMyTenant(myTenant);
            }
            catch (Exception ex)
            {
                tenantSettingsForm.SetError(ex.Message);
            }
        }
Exemple #2
0
        private async Task DefaultLoadAsync()
        {
            try
            {
                deleteTenantError       = null;
                deleteTenantAcknowledge = false;
                var myTenant = await MyTenantService.GetTenantAsync();

                savedCustomDomain = myTenant.CustomDomain;
                await tenantSettingsForm.InitAsync(myTenant.Map <TenantSettingsViewModel>());

                RouteBindingLogic.SetMyTenant(myTenant);
            }
            catch (TokenUnavailableException)
            {
                await(OpenidConnectPkce as TenantOpenidConnectPkce).TenantLoginAsync();
            }
            catch (Exception ex)
            {
                tenantSettingsForm.SetError(ex.Message);
            }
        }