mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 15:35:22 +02:00
clean up
This commit is contained in:
parent
76ed354d76
commit
92c46f35eb
1 changed files with 3 additions and 8 deletions
|
@ -141,7 +141,6 @@ export class TellerETL implements IETL<Connection, TellerRawData, TellerData> {
|
||||||
// upsert accounts
|
// upsert accounts
|
||||||
...accounts.map((tellerAccount) => {
|
...accounts.map((tellerAccount) => {
|
||||||
const type = TellerUtil.getType(tellerAccount.type)
|
const type = TellerUtil.getType(tellerAccount.type)
|
||||||
const categoryProvider = TellerUtil.tellerTypesToCategory(tellerAccount.type)
|
|
||||||
const classification = AccountUtil.getClassification(type)
|
const classification = AccountUtil.getClassification(type)
|
||||||
|
|
||||||
return this.prisma.account.upsert({
|
return this.prisma.account.upsert({
|
||||||
|
@ -152,9 +151,9 @@ export class TellerETL implements IETL<Connection, TellerRawData, TellerData> {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
type,
|
type: TellerUtil.getType(tellerAccount.type),
|
||||||
provider: 'teller',
|
provider: 'teller',
|
||||||
categoryProvider,
|
categoryProvider: TellerUtil.tellerTypesToCategory(tellerAccount.type),
|
||||||
subcategoryProvider: tellerAccount.subtype ?? 'other',
|
subcategoryProvider: tellerAccount.subtype ?? 'other',
|
||||||
accountConnectionId: connection.id,
|
accountConnectionId: connection.id,
|
||||||
userId: connection.userId,
|
userId: connection.userId,
|
||||||
|
@ -264,11 +263,7 @@ export class TellerETL implements IETL<Connection, TellerRawData, TellerData> {
|
||||||
${details.counterparty?.name ?? ''},
|
${details.counterparty?.name ?? ''},
|
||||||
${type},
|
${type},
|
||||||
${details.category ?? ''},
|
${details.category ?? ''},
|
||||||
${
|
${maybeCategoryByTellerCategory[details.category ?? ''] ?? 'Other'}
|
||||||
details.category
|
|
||||||
? maybeCategoryByTellerCategory[details.category]
|
|
||||||
: 'Other'
|
|
||||||
}
|
|
||||||
)`
|
)`
|
||||||
})
|
})
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue