Method
listWithCatid
(typeid, type, interfaceId)
Source from the content-addressed store, hash-verified
| 136 | } |
| 137 | |
| 138 | listWithCatid(typeid, type, interfaceId) { |
| 139 | const params = { |
| 140 | type: type, |
| 141 | typeid: typeid |
| 142 | }; |
| 143 | if (interfaceId && !isNaN(interfaceId)) { |
| 144 | params['data.interface_id'] = +interfaceId; |
| 145 | } |
| 146 | return this.model |
| 147 | .find(params) |
| 148 | .sort({ add_time: -1 }) |
| 149 | .limit(1) |
| 150 | .select('uid content type username typeid add_time') |
| 151 | .exec(); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | module.exports = logModel; |
Tested by
no test coverage detected