From 3c193cae890de0d2ab58c07f3f208dd6b5d96d8a Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 11 Oct 2025 20:10:22 +0200 Subject: [PATCH] Remove deprecated endpoints * GET api/v1/portfolio/position/:dataSource/:symbol * PUT api/v1/portfolio/position/:dataSource/:symbol/tags --- .../src/app/portfolio/portfolio.controller.ts | 66 ------------------- 1 file changed, 66 deletions(-) diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 5659818a8..19b0636c7 100644 --- a/apps/api/src/app/portfolio/portfolio.controller.ts +++ b/apps/api/src/app/portfolio/portfolio.controller.ts @@ -610,36 +610,6 @@ export class PortfolioController { return performanceInformation; } - /** - * @deprecated - */ - @Get('position/:dataSource/:symbol') - @UseInterceptors(RedactValuesInResponseInterceptor) - @UseInterceptors(TransformDataSourceInRequestInterceptor) - @UseInterceptors(TransformDataSourceInResponseInterceptor) - @UseGuards(AuthGuard('jwt'), HasPermissionGuard) - public async getPosition( - @Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, - @Param('dataSource') dataSource: DataSource, - @Param('symbol') symbol: string - ): Promise { - const holding = await this.portfolioService.getHolding({ - dataSource, - impersonationId, - symbol, - userId: this.request.user.id - }); - - if (!holding) { - throw new HttpException( - getReasonPhrase(StatusCodes.NOT_FOUND), - StatusCodes.NOT_FOUND - ); - } - - return holding; - } - @Get('report') @UseGuards(AuthGuard('jwt'), HasPermissionGuard) public async getReport( @@ -699,40 +669,4 @@ export class PortfolioController { userId: this.request.user.id }); } - - /** - * @deprecated - */ - @HasPermission(permissions.updateOrder) - @Put('position/:dataSource/:symbol/tags') - @UseInterceptors(TransformDataSourceInRequestInterceptor) - @UseGuards(AuthGuard('jwt'), HasPermissionGuard) - public async updatePositionTags( - @Body() data: UpdateHoldingTagsDto, - @Headers(HEADER_KEY_IMPERSONATION.toLowerCase()) impersonationId: string, - @Param('dataSource') dataSource: DataSource, - @Param('symbol') symbol: string - ): Promise { - const holding = await this.portfolioService.getHolding({ - dataSource, - impersonationId, - symbol, - userId: this.request.user.id - }); - - if (!holding) { - throw new HttpException( - getReasonPhrase(StatusCodes.NOT_FOUND), - StatusCodes.NOT_FOUND - ); - } - - await this.portfolioService.updateTags({ - dataSource, - impersonationId, - symbol, - tags: data.tags, - userId: this.request.user.id - }); - } }