mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 23:15:24 +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
|
||||
...accounts.map((tellerAccount) => {
|
||||
const type = TellerUtil.getType(tellerAccount.type)
|
||||
const categoryProvider = TellerUtil.tellerTypesToCategory(tellerAccount.type)
|
||||
const classification = AccountUtil.getClassification(type)
|
||||
|
||||
return this.prisma.account.upsert({
|
||||
|
@ -152,9 +151,9 @@ export class TellerETL implements IETL<Connection, TellerRawData, TellerData> {
|
|||
},
|
||||
},
|
||||
create: {
|
||||
type,
|
||||
type: TellerUtil.getType(tellerAccount.type),
|
||||
provider: 'teller',
|
||||
categoryProvider,
|
||||
categoryProvider: TellerUtil.tellerTypesToCategory(tellerAccount.type),
|
||||
subcategoryProvider: tellerAccount.subtype ?? 'other',
|
||||
accountConnectionId: connection.id,
|
||||
userId: connection.userId,
|
||||
|
@ -264,11 +263,7 @@ export class TellerETL implements IETL<Connection, TellerRawData, TellerData> {
|
|||
${details.counterparty?.name ?? ''},
|
||||
${type},
|
||||
${details.category ?? ''},
|
||||
${
|
||||
details.category
|
||||
? maybeCategoryByTellerCategory[details.category]
|
||||
: 'Other'
|
||||
}
|
||||
${maybeCategoryByTellerCategory[details.category ?? ''] ?? 'Other'}
|
||||
)`
|
||||
})
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue