/// <summary> /// Method that creates a post /// </summary> public async Task <bool> CreatePost(Writter.API.Dto.CreatePostRequest post) { try { var newPost = _mapper.Map <Writter.Domain.Dto.CreatePostRequest>(post); var response = await _service.CreatePost(newPost); return(response); } catch (Exception ex) { return(false); } }
/// <summary> /// Method that creates a post /// </summary> public async Task <bool> CreatePost(Dto.CreatePostRequest post) { try { var newPost = _mapper.Map <Domain.Dto.CreatePostRequest>(post); var Response = await _writterService.CreatePost(newPost); return(Response); } catch (Exception e) { return(false); } }