MCPcopy Index your code
hub / github.com/YMFE/yapi / listWithPaging

Method listWithPaging

server/models/log.js:66–86  ·  view source on GitHub ↗
(typeid, type, page, limit, selectValue)

Source from the content-addressed store, hash-verified

64 }
65
66 listWithPaging(typeid, type, page, limit, selectValue) {
67 page = parseInt(page);
68 limit = parseInt(limit);
69 const params = {
70 type: type,
71 typeid: typeid
72 };
73
74 if (selectValue === 'wiki') {
75 params['data.type'] = selectValue;
76 }
77 if (selectValue && !isNaN(selectValue)) {
78 params['data.interface_id'] = +selectValue;
79 }
80 return this.model
81 .find(params)
82 .sort({ add_time: -1 })
83 .skip((page - 1) * limit)
84 .limit(limit)
85 .exec();
86 }
87 listWithPagingByGroup(typeid, pidList, page, limit) {
88 page = parseInt(page);
89 limit = parseInt(limit);

Callers 2

listMethod · 0.45
listMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected