public Post UpdatePost(Post post)
{
try
{
if (!ValidatePostContents(post.PostContents))
throw new Exception("Cannot upload more than one video.");
post = PostCleanUp(post);
var tPost = _postRepository.Edit(PostMapper.ToEntity(post));
return EntityToDtoPostCleanUp(tPost, tPost.PostId);
}
catch (Exception ex)
{
throw new BlogException(ex.Message, ex.InnerException);
}
}