Browse Source

Clean-up code

pull/3199/head
Nicolas Fedor 1 year ago
parent
commit
28a1755686
  1. 58
      apps/api/src/app/admin/admin.service.ts

58
apps/api/src/app/admin/admin.service.ts

@ -331,39 +331,33 @@ export class AdminService {
symbol, symbol,
symbolMapping symbolMapping
}: Prisma.SymbolProfileUpdateInput & UniqueAsset) { }: Prisma.SymbolProfileUpdateInput & UniqueAsset) {
let updatedSymbolProfile: Prisma.SymbolProfileUpdateInput & UniqueAsset = { const updatedSymbolProfile: Prisma.SymbolProfileUpdateInput & UniqueAsset =
assetClass, {
assetSubClass, assetClass,
comment, assetSubClass,
countries, comment,
currency, countries,
dataSource, currency,
scraperConfiguration, dataSource,
sectors, scraperConfiguration,
symbol, sectors,
symbolMapping symbol,
}; symbolMapping,
...(dataSource === 'MANUAL'
if (dataSource === 'MANUAL') { ? { name }
updatedSymbolProfile = { : {
...updatedSymbolProfile, SymbolProfileOverrides: {
name upsert: {
}; create: {
} else { name: name as string
updatedSymbolProfile = { },
...updatedSymbolProfile, update: {
SymbolProfileOverrides: { name: name as string
upsert: { }
create: { }
name: name as string }
}, })
update: {
name: name as string
}
}
}
}; };
}
await this.symbolProfileService.updateSymbolProfile(updatedSymbolProfile); await this.symbolProfileService.updateSymbolProfile(updatedSymbolProfile);

Loading…
Cancel
Save