public async Task <IActionResult> GetQuiz(int id) { int currentUserId = User.Claims.GetUserId(); AzureBlobService blobService = new AzureBlobService(); await blobService.InitializeBlob(); Quiz quiz = quizRepository.GetQuizById(id); if (quiz == null || quiz.UserId != currentUserId) { return(NotFound("Quiz doesn't exist")); } quiz.PictureUrl = blobService.urlPath.AbsoluteUri.ToString() + "users/" + quiz.PictureUrl; QuizViewModel quizVm = this.entityToVmMapper.Map(quiz); return(Ok(quizVm)); }