mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
make transaction a const
This commit is contained in:
parent
cc395cf31f
commit
c2dfd50654
@ -316,7 +316,7 @@ export class AdminResolver {
|
|||||||
}
|
}
|
||||||
newBalance = Number(newBalance) + Number(parseInt(pendingCreation.amount.toString()))
|
newBalance = Number(newBalance) + Number(parseInt(pendingCreation.amount.toString()))
|
||||||
|
|
||||||
let transaction = new Transaction()
|
const transaction = new Transaction()
|
||||||
transaction.typeId = TransactionTypeId.CREATION
|
transaction.typeId = TransactionTypeId.CREATION
|
||||||
transaction.memo = pendingCreation.memo
|
transaction.memo = pendingCreation.memo
|
||||||
transaction.userId = pendingCreation.userId
|
transaction.userId = pendingCreation.userId
|
||||||
@ -324,8 +324,7 @@ export class AdminResolver {
|
|||||||
transaction.creationDate = pendingCreation.date
|
transaction.creationDate = pendingCreation.date
|
||||||
transaction.balance = BigInt(newBalance)
|
transaction.balance = BigInt(newBalance)
|
||||||
transaction.balanceDate = receivedCallDate
|
transaction.balanceDate = receivedCallDate
|
||||||
transaction = await transaction.save()
|
await transaction.save()
|
||||||
// if (!transaction) throw new Error('Could not create transaction')
|
|
||||||
|
|
||||||
let userBalance = await Balance.findOne({ userId: pendingCreation.userId })
|
let userBalance = await Balance.findOne({ userId: pendingCreation.userId })
|
||||||
if (!userBalance) {
|
if (!userBalance) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user