Skip to content

Commit a839e3c

Browse files
author
pedro
authored
Merge pull request #35 from TaleLin/dev
Dev
2 parents 0a7d2a1 + 915b593 commit a839e3c

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

app/api/v1/book.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const {
1515
const { PositiveIdValidator } = require('../../validators/common');
1616

1717
const { BookNotFound } = require('../../libs/err-code');
18-
const { Book } = require('../../models/book');
1918
const { BookDao } = require('../../dao/book');
2019

2120
// book 的红图实例
@@ -93,14 +92,4 @@ bookApi.linDelete(
9392
}
9493
);
9594

96-
bookApi.get('/', async ctx => {
97-
const books = await Book.findAll();
98-
if (books.length < 1) {
99-
throw new NotFound({
100-
msg: '没有找到相关书籍'
101-
});
102-
}
103-
ctx.json(books);
104-
});
105-
10695
module.exports = { bookApi, [disableLoading]: false };

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343
"koa-bodyparser": "^4.2.1",
4444
"koa-mount": "^4.0.0",
4545
"koa-static": "^5.0.0",
46-
"lin-mizar": "^0.2.0-beta.1"
46+
"lin-mizar": "^0.2.0-beta.2"
4747
}
4848
}

0 commit comments

Comments
 (0)