Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Bugfix/fix activities import (#3095)

Thomas Kaulc37ad9bad4af
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51d86efa11..dbe4e13d92 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Optimized the calculation of the portfolio summary
+### Fixed
+
+- Fixed the the activities import (query parameter handling)
+
## 2.60.0 - 2024-03-02
### Added
diff --git a/apps/api/src/app/import/import.controller.ts b/apps/api/src/app/import/import.controller.ts
index b7aff8634f..29a06fc9fd 100644
--- a/apps/api/src/app/import/import.controller.ts
+++ b/apps/api/src/app/import/import.controller.ts
@@ -43,8 +43,10 @@ export class ImportController {
@UseInterceptors(TransformDataSourceInResponseInterceptor)
public async import(
@Body() importData: ImportDataDto,
- @Query('dryRun') isDryRun = false
+ @Query('dryRun') isDryRunParam = 'false'
): Promise<ImportResponse> {
+ const isDryRun = isDryRunParam === 'true';
+
if (
!hasPermission(this.request.user.permissions, permissions.createAccount)
) {
diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts
index 8f4acc060c..e513215610 100644
--- a/apps/api/src/app/portfolio/portfolio.controller.ts
+++ b/apps/api/src/app/portfolio/portfolio.controller.ts
@@ -342,9 +342,12 @@ export class PortfolioController {
@Query('assetClasses') filterByAssetClasses?: string,
@Query('range') dateRange: DateRange = 'max',
@Query('tags') filterByTags?: string,
- @Query('withExcludedAccounts') withExcludedAccounts = false,
- @Query('withItems') withItems = false
+ @Query('withExcludedAccounts') withExcludedAccountsParam = 'false',
+ @Query('withItems') withItemsParam = 'false'
): Promise<PortfolioPerformanceResponse> {
+ const withExcludedAccounts = withExcludedAccountsParam === 'true';
+ const withItems = withItemsParam === 'true';
+
const hasReadRestrictedAccessPermission =
this.userService.hasReadRestrictedAccessPermission({
impersonationId,
diff --git a/apps/api/src/app/symbol/symbol.controller.ts b/apps/api/src/app/symbol/symbol.controller.ts
index e41267b79b..17e0056d6f 100644
--- a/apps/api/src/app/symbol/symbol.controller.ts
+++ b/apps/api/src/app/symbol/symbol.controller.ts
@@ -39,9 +39,11 @@ export class SymbolController {
@UseGuards(AuthGuard('jwt'), HasPermissionGuard)
@UseInterceptors(TransformDataSourceInResponseInterceptor)
public async lookupSymbol(
- @Query('includeIndices') includeIndices = false,
+ @Query('includeIndices') includeIndicesParam = 'false',
@Query('query') query = ''
): Promise<{ items: LookupItem[] }> {
+ const includeIndices = includeIndicesParam === 'true';
+
try {
return this.symbolService.lookup({
includeIndices,