mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix rebase error
This commit is contained in:
parent
f6776ca3fc
commit
3112f5b7ea
@ -20,8 +20,17 @@ export class BalanceResolver {
|
||||
|
||||
const userEntity = await userRepository.findByPubkeyHex(context.pubKey)
|
||||
const balanceEntity = await balanceRepository.findByUser(userEntity.id)
|
||||
let balance: Balance
|
||||
const now = new Date()
|
||||
|
||||
// No balance found
|
||||
if (!balanceEntity) {
|
||||
return new Balance({
|
||||
balance: 0,
|
||||
decay: 0,
|
||||
decay_date: now.toString(),
|
||||
})
|
||||
}
|
||||
|
||||
return new Balance({
|
||||
balance: roundFloorFrom4(balanceEntity.amount),
|
||||
decay: roundFloorFrom4(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user