We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
提问方式:
不好的提问方式:
The text was updated successfully, but these errors were encountered:
在4.9.1 文章模型设计,// GET /posts/:postId/remove 删除一篇文章 PostModel.delPostById(postId) .then(function () { req.flash('success', '删除文章成功') // 删除成功后跳转到主页 res.redirect('/posts') }) 这里只有delPostById方法只传递了postId,我认为缺少了author,因为在models定义方法时需要传两个ID,并且我尝试删除文章时虽然提示成功,但是文章没有被删除,我加上author后删除成功了。 希望您有空时看一下
PostModel.delPostById(postId) .then(function () { req.flash('success', '删除文章成功') // 删除成功后跳转到主页 res.redirect('/posts') })
Sorry, something went wrong.
@byInWind
并且我尝试删除文章时虽然提示成功,但是文章没有被删除,我加上author后删除成功了
我也遇到了这个问题,请问你这里的代码是怎么写的
在这里 PostModel.delPostById(postId)加上author 改为这样PostModel.delPostById(postId,author) 试一下吧
@byInWind 好的,谢谢!
No branches or pull requests
提问方式:
不好的提问方式:
The text was updated successfully, but these errors were encountered: