Skip to content

Commit 09c0eaa

Browse files
refactor(OUT-4005): use constructor to instantiate service
1 parent 5e3cf8a commit 09c0eaa

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/app/api/quickbooks/payout/payout.service.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ import { PayoutLineItem } from '@/type/dto/webhook.dto'
1818
import IntuitAPI, { IntuitAPITokensType } from '@/utils/intuitAPI'
1919
import { AccountTypeObj } from '@/constant/qbConnection'
2020
import { validateAccessToken } from '@/utils/auth'
21+
import User from '@/app/api/core/models/User.model'
2122

2223
export class PayoutService extends BaseService {
23-
private syncLogService = new SyncLogService(this.user)
24+
private syncLogService: SyncLogService
25+
26+
constructor(user: User) {
27+
super(user)
28+
this.syncLogService = new SyncLogService(user)
29+
}
2430

2531
// Same (portalId, payoutId) updates the same row, so a re-sent payout
2632
// never makes a duplicate.

0 commit comments

Comments
 (0)