Skip to content

Commit 3b34d3d

Browse files
author
zhongchubing
committed
fix: 排行榜只显示审核通过导航
1 parent 723384e commit 3b34d3d

File tree

1 file changed

+7
-1
lines changed
  • geekape-nav-server/app/service

1 file changed

+7
-1
lines changed

geekape-nav-server/app/service/Nav.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import { Service } from 'egg';
22

3+
export enum NAV_STATUS {
4+
pass,
5+
wait,
6+
reject
7+
}
8+
39

410
export default class NavService extends Service {
511
async findMaxValueList(value) {
6-
return await this.ctx.model.Nav.find().sort({ [value]: -1 }).limit(10)
12+
return await this.ctx.model.Nav.find({ status: NAV_STATUS.pass }).sort({ [value]: -1 }).limit(10)
713
}
814
}

0 commit comments

Comments
 (0)