Skip to content

Commit

Permalink
feat: Update Mentee entity to use UUID for certificate_id
Browse files Browse the repository at this point in the history
  • Loading branch information
mayura-andrew committed Jul 28, 2024
1 parent a933df7 commit 008fa39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"passport": "^0.6.0",
"passport-google-oauth20": "^2.0.0",
"passport-jwt": "^4.0.1",
"pdf-lib": "^1.17.1",
"passport-linkedin-oauth2": "github:auth0/passport-linkedin-oauth2#v3.0.0",
"pdf-lib": "^1.17.1",
"pg": "^8.10.0",
"reflect-metadata": "^0.1.13",
"ts-node": "^10.9.1",
Expand Down
5 changes: 2 additions & 3 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import multer from 'multer'
import ejs from 'ejs'
import { ApplicationStatus } from './enums'
import { generateCertificate } from './services/admin/generateCertificate'
import { v4 as uuidv4 } from 'uuid'

import { randomUUID } from 'crypto'
export const signAndSetCookie = (res: Response, uuid: string): void => {
const token = jwt.sign({ userId: uuid }, JWT_SECRET ?? '')

Expand Down Expand Up @@ -177,7 +176,7 @@ export const getEmailContent = async (
Thank you again for considering our program and for the time you invested in your application. We wish you all the best in your future endeavours.`
}
case ApplicationStatus.COMPLETED: {
const uniqueId = uuidv4()
const uniqueId = randomUUID()
const pdfFileName = await generateCertificate(
name,
'./src/certificates/certificate_template.pdf',
Expand Down

0 comments on commit 008fa39

Please sign in to comment.