我有关于扩展名的数据
现在,我想获取数据计数,即该URL上的记录数。如何实现这一目标。我没有找到任何过滤器或方法。预先谢谢你
我刚刚添加了新的扩展程序来解决此问题。
@get('/users/{id}/carts/count', {
responses: {
'200': {
description: 'Users model count',
content: { 'application/json': { schema: CountSchema } },
},
},
})
async count(
@param.query.object('where', getWhereSchemaFor(Users)) where?: Where<Users>,
): Promise<Count> {
return this.usersRepository.count(where);
}
现在,我可以依靠url'users / id / carts / count']了>