Esempio n. 1
0
        public async Task <IActionResult> Delete([FromBody] PostViewModel Post)
        {
            try
            {
                var post = await _postService.GetSingle(Post.title, Post.nickname);

                await _postTagService.DeletePostTagNodes(post.Id);

                await _postService.DeletePost(Post.title, Post.nickname);

                return(Ok());
            }
            catch (Exception e)
            {
                return(BadRequest(e.ToString()));
            }
        }