Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
muhiddinjv committed Jun 15, 2024
1 parent 1bfaee2 commit e199b2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/goods/goods.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class GoodsService {
}

async findAll(userId: string, page: number, limit: number): Promise<GoodDocument[]> {
const skip = (page - 1) * limit;
const skip = Math.max((page - 1) * limit, 0);
return await this.goodsModel.find({ userId }).skip(skip).limit(limit);
}

Expand Down

0 comments on commit e199b2a

Please sign in to comment.