Пример #1
0
        private async Task AddVideoToDb()
        {
            var apiResult = await PublicClient.PostVideo(Video);

            apiResponse = apiResult ? "Submission Successful!" : "Sorry, something went wrong. Submission failed";
            if (apiResult)
            {
                AppState.AddVideo(Video);
                title    = "";
                videoUrl = "";
                Video    = null;
                StateHasChanged();
                await Task.Delay(2000);

                isSubmitReady = !isSubmitReady;
                StateHasChanged();
            }
            StateHasChanged();
        }