Browse Source
Feature/data source transformation in import for self-hosted environments (#6032)
* Introduce data source transformation support for self-hosted environments
* Update changelog
pull/5966/head^2
Thomas Kaul
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
17 additions and
0 deletions
-
CHANGELOG.md
-
apps/api/src/interceptors/transform-data-source-in-request/transform-data-source-in-request.interceptor.ts
|
|
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
## Unreleased |
|
|
|
|
|
|
|
#### Added |
|
|
|
|
|
|
|
- Introduced data source transformation support in the import functionality for self-hosted environments |
|
|
|
|
|
|
|
#### Changed |
|
|
|
|
|
|
|
- Increased the numerical precision for cryptocurrency quantities in the holding detail dialog |
|
|
|
|
|
|
|
@ -69,6 +69,19 @@ export class TransformDataSourceInRequestInterceptor< |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (request.body?.activities) { |
|
|
|
request.body.activities = request.body.activities.map((activity) => { |
|
|
|
if (DataSource[activity.dataSource]) { |
|
|
|
return activity; |
|
|
|
} else { |
|
|
|
return { |
|
|
|
...activity, |
|
|
|
dataSource: decodeDataSource(activity.dataSource) |
|
|
|
}; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return next.handle(); |
|
|
|
|