Skip to content

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

Bugfix/add missing permission guard in create watchlist item endpoint (#4686)

Thomas Kaul480709c32a15
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4034fd9a20..551a0d0759 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved the language localization for Italian (`it`)
- Upgraded `nestjs` from version `10.4.15` to `11.0.12`
+### Fixed
+
+- Fixed an issue in the watchlist endpoint (`POST`) related to the `HasPermissionGuard`
+
## 2.161.0 - 2025-05-06
### Added
diff --git a/apps/api/src/app/endpoints/watchlist/watchlist.controller.ts b/apps/api/src/app/endpoints/watchlist/watchlist.controller.ts
index 8d9d322a8d..2a8ea9875e 100644
--- a/apps/api/src/app/endpoints/watchlist/watchlist.controller.ts
+++ b/apps/api/src/app/endpoints/watchlist/watchlist.controller.ts
@@ -39,7 +39,7 @@ export class WatchlistController {
@Post()
@HasPermission(permissions.createWatchlistItem)
- @UseGuards(AuthGuard('jwt'))
+ @UseGuards(AuthGuard('jwt'), HasPermissionGuard)
@UseInterceptors(TransformDataSourceInRequestInterceptor)
public async createWatchlistItem(@Body() data: CreateWatchlistItemDto) {
return this.watchlistService.createWatchlistItem({