Feature/expire snapshot cache on holding tags change (#4277)
* Expire snapshot cache on holding tags change * Update changelog
This commit is contained in:
parent
3037f7cec6
commit
8878212487
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
- Improved the caching of the portfolio snapshot in the portfolio calculator by expiring cache entries when a user changes tags in the holding detail dialog
|
||||||
- Improved the language localization for German (`de`)
|
- Improved the language localization for German (`de`)
|
||||||
|
|
||||||
## 2.137.1 - 2025-02-01
|
## 2.137.1 - 2025-02-01
|
||||||
|
@ -63,14 +63,14 @@ export class OrderService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return Promise.all(
|
await Promise.all(
|
||||||
orders.map(({ id }) =>
|
orders.map(({ id }) =>
|
||||||
this.prismaService.order.update({
|
this.prismaService.order.update({
|
||||||
data: {
|
data: {
|
||||||
tags: {
|
tags: {
|
||||||
// The set operation replaces all existing connections with the provided ones
|
// The set operation replaces all existing connections with the provided ones
|
||||||
set: tags.map(({ id }) => {
|
set: tags.map((tag) => {
|
||||||
return { id };
|
return { id: tag.id };
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -78,6 +78,13 @@ export class OrderService {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.eventEmitter.emit(
|
||||||
|
PortfolioChangedEvent.getName(),
|
||||||
|
new PortfolioChangedEvent({
|
||||||
|
userId
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async createOrder(
|
public async createOrder(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user