resume data added#125
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Code Review
This pull request adds logic to update the resumeData field in the database when a tracking record already exists. The review feedback recommends replacing the raw SQL query with TypeORM's built-in repository update method to improve type safety and maintainability, as well as using modern TypeScript features like the nullish coalescing operator.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| //update resumeData | ||
| let temp_resumeData=createContentTrackingDto.resumeData ? createContentTrackingDto.resumeData : 0; | ||
| await this.dataSource.query( | ||
| `UPDATE content_tracking set "resumeData"=$2 WHERE "contentTrackingId"=$1`, | ||
| [ | ||
| contentTrackingId, | ||
| temp_resumeData | ||
| ], | ||
| ); |
There was a problem hiding this comment.
Instead of using raw SQL queries via this.dataSource.query, it is highly recommended to use TypeORM's built-in repository methods (e.g., this.contentTrackingRepository.update). This ensures type safety, better maintainability, and leverages TypeORM's query optimization. Additionally, we can use the nullish coalescing operator (??) and const instead of let for cleaner, modern TypeScript code.
| //update resumeData | |
| let temp_resumeData=createContentTrackingDto.resumeData ? createContentTrackingDto.resumeData : 0; | |
| await this.dataSource.query( | |
| `UPDATE content_tracking set "resumeData"=$2 WHERE "contentTrackingId"=$1`, | |
| [ | |
| contentTrackingId, | |
| temp_resumeData | |
| ], | |
| ); | |
| const resumeData = createContentTrackingDto.resumeData ?? 0; | |
| await this.contentTrackingRepository.update(contentTrackingId, { resumeData }); |



No description provided.