public async Task Create(CreateContentViewModel input) { try { string mainImageUrl = await _blobManager.UploadImageAsBlob(input.MainImage); string slideImageUrl = await _blobManager.UploadImageAsBlob(input.SlideImage); string videoUrl = await _blobManager.UploadImageAsBlob(input.Video); string audioUrl = await _blobManager.UploadImageAsBlob(input.Audio); CreateContentDTO data = new CreateContentDTO() { Name = input.Name, Description = input.Description, Title = input.Title, MainImageURL = mainImageUrl, SlideImageURL = slideImageUrl, VideoURL = videoUrl, AudioURL = audioUrl, IsHomePage = input.IsHomePage, IsCampaign = input.IsCampaign, Text = input.Text, LocationId = input.LocationId }; await _contentService.CrateContent(data); } catch (Exception e) { throw e; } }
public async Task <IActionResult> CreateContent(CreateContentDTO input) { try { await _contentService.CrateContent(input); return(Ok()); } catch (Exception) { throw; } }