feat: allow filter profit range
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 7s

This commit is contained in:
Methapon2001 2025-03-04 16:34:15 +07:00
parent 9bd24b5a83
commit 5d78166047

View file

@ -316,7 +316,6 @@ export class StatsController extends Controller {
@Get("profit")
async profit(
@Request() req: RequestWithUser,
@Query() limit?: number,
@Query() startDate?: Date,
@Query() endDate?: Date,
) {
@ -367,9 +366,9 @@ export class StatsController extends Controller {
registeredBranch: {
OR: permissionCondCompany(req.user),
},
createdAt: { gte: startDate, lte: endDate },
},
},
take: limit,
});
const data = record.map((v) => {