Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/remove deprecated position endpoints from portfolio controller (#5733)
Thomas Kaula9f38aaf9045
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e26093a0c0..01883f0f3e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0- Changed the _As seen in_ section on the landing page to an animated carousel- Refactored `transactionCount` to `activitiesCount` in the endpoint `GET api/v1/portfolio/holding/:dataSource/:symbol`- Refactored various components to use self-closing tags+- Removed the deprecated endpoint `GET api/v1/portfolio/position/:dataSource/:symbol`+- Removed the deprecated endpoint `PUT api/v1/portfolio/position/:dataSource/:symbol/tags`- Improved the language localization for German (`de`)- Upgraded `prisma` from version `6.16.1` to `6.16.3`diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.tsindex 5659818a81..19b0636c7d 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<PortfolioHoldingResponse> {- 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<void> {- 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- });- }}