...
|
...
|
@@ -13,12 +13,17 @@ const INVALID_CONTENT = '内容[content]都不能为空'; |
|
|
|
|
|
const article = {
|
|
|
/**
|
|
|
* 所有文章
|
|
|
* 文章列表
|
|
|
* @param req
|
|
|
* @param res
|
|
|
*/
|
|
|
all(req, res) {
|
|
|
req.ctx(ArticleModel).allArticles()
|
|
|
list(req, res) {
|
|
|
// const query = req.query;
|
|
|
// const pageNo = query.pageNo;
|
|
|
// const popular = query.popular || false;
|
|
|
// const pageSize = query.pageSize;
|
|
|
|
|
|
req.ctx(ArticleModel).articleList()
|
|
|
.then(result => {
|
|
|
res.json({
|
|
|
code: 200,
|
...
|
...
|
@@ -64,6 +69,7 @@ const article = { |
|
|
.then(() => {
|
|
|
res.json({
|
|
|
code: 200,
|
|
|
data: {id},
|
|
|
message: ADD_ARTICLE_SUCCESS
|
|
|
});
|
|
|
});
|
...
|
...
|
|