Skip to content

Commit

Permalink
fix(pdf): fix 2 pages pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
emile-bex committed Nov 29, 2023
1 parent 174dca6 commit 324b5e0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/cvs/cvs.controller.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
// BadRequestException,
Body,
Controller,
Get,
Expand Down Expand Up @@ -166,8 +165,14 @@ export class CVsController {
const token = getTokenFromHeaders(req);

let isTwoPages = false;
if (createCVDto.experiences?.length + createCVDto.formations?.length > 4)

if (
(createCVDto.experiences?.length || 0) +
(createCVDto.formations?.length || 0) >
4
) {
isTwoPages = true;
}

await this.cvsService.sendGenerateCVPDF(
candidateId,
Expand Down

0 comments on commit 324b5e0

Please sign in to comment.