Exemplo n.º 1
0
        private async Task DefaultLoadAsync()
        {
            try
            {
                deleteTrackError       = null;
                deleteTrackAcknowledge = false;
                var track = await TrackService.GetTrackAsync(TrackSelectedLogic.Track.Name);

                var trackSendEmail = await TrackService.GetTrackSendEmailAsync();

                await updateTrackForm.InitAsync(track.Map <UpdateTrackViewModel>(afterMap: afterMap =>
                {
                    if (trackSendEmail != null)
                    {
                        afterMap.SendMailExist  = true;
                        afterMap.FromEmail      = trackSendEmail.FromEmail;
                        afterMap.SendgridApiKey = trackSendEmail.SendgridApiKey;
                    }
                }));
            }
            catch (TokenUnavailableException)
            {
                await(OpenidConnectPkce as TenantOpenidConnectPkce).TenantLoginAsync();
            }
            catch (Exception ex)
            {
                updateTrackForm.SetError(ex.Message);
            }
        }
Exemplo n.º 2
0
        private async Task DefaultLoadAsync()
        {
            try
            {
                deleteTrackError       = null;
                deleteTrackAcknowledge = false;
                var track = await TrackService.GetTrackAsync(TrackSelectedLogic.Track.Name);

                await trackSettingsForm.InitAsync(track.Map <TrackSettingsViewModel>());
            }
            catch (TokenUnavailableException)
            {
                await(OpenidConnectPkce as TenantOpenidConnectPkce).TenantLoginAsync();
            }
            catch (Exception ex)
            {
                trackSettingsForm.SetError(ex.Message);
            }
        }