From 7d30c9a90d0f3dea56dfe9e024d971a51f2aa62b Mon Sep 17 00:00:00 2001 From: boufni95 Date: Thu, 24 Jul 2025 15:16:20 +0000 Subject: [PATCH] cleanup --- src/services/storage/paymentStorage.ts | 32 -------------------------- 1 file changed, 32 deletions(-) diff --git a/src/services/storage/paymentStorage.ts b/src/services/storage/paymentStorage.ts index ea92ad88..4f915645 100644 --- a/src/services/storage/paymentStorage.ts +++ b/src/services/storage/paymentStorage.ts @@ -73,38 +73,6 @@ export default class { return this.dbs.Update('UserReceivingInvoice', invoice.serial_id, i, txId) } - - - async GetUserInvoicesFlaggedAsPaid2(serialId: number, fromIndex: number, fromTs: number, take = 50, txId?: string): Promise { - let items = await this.dbs.Find('UserReceivingInvoice', { - where: { - user: { serial_id: serialId }, - paid_at_unix: And(MoreThan(0), Equal(fromTs)), - serial_id: MoreThan(fromIndex) - }, - order: { - paid_at_unix: 'DESC', - serial_id: 'DESC' - }, - take - }, txId) - const more = take - items.length - if (more > 0) { - const more = await this.dbs.Find('UserReceivingInvoice', { - where: { - user: { serial_id: serialId }, - paid_at_unix: And(MoreThan(0), MoreThan(fromTs)), - }, - order: { - paid_at_unix: 'DESC', - serial_id: 'DESC' - }, - take - }, txId) - items.push(...more) - } - return items - } GetUserInvoicesFlaggedAsPaid(userId: string, fromIndex: number, take = 50, txId?: string): Promise { return this.dbs.Find('UserReceivingInvoice', { where: {