Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add complete status #145

Merged
merged 18 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a9d954c
chore: Add pdf-lib dependency for generating certificates, Add COMPLE…
mayura-andrew Jul 11, 2024
afac5d8
Merge branch 'main' into add-complete-status
mayura-andrew Jul 11, 2024
28012ed
chore: Add uuid dependency for generating unique identifiers
mayura-andrew Jul 13, 2024
89fb972
chore: Update npm scripts and database configuration
mayura-andrew Jul 13, 2024
08caab7
chore: Update dbConfig to disable synchronization
mayura-andrew Jul 13, 2024
0e4a52f
Merge branch 'main' into add-complete-status
mayura-andrew Jul 13, 2024
37e1ab0
feat: Update Mentee entity to use UUID for certificate_id
mayura-andrew Jul 13, 2024
6943990
Merge branch 'main' into add-complete-status
mayura-andrew Jul 14, 2024
6236907
Merge branch 'main' into add-complete-status
mayura-andrew Jul 20, 2024
769cd41
Merge branch 'main' into add-complete-status
mayura-andrew Jul 21, 2024
a933df7
Merge branch 'sef-global:main' into add-complete-status
mayura-andrew Jul 28, 2024
008fa39
feat: Update Mentee entity to use UUID for certificate_id
mayura-andrew Jul 28, 2024
b0bce78
Merge branch 'sef-global:main' into add-complete-status
mayura-andrew Jul 31, 2024
7010463
chore: Update package dependencies and remove unused entities
mayura-andrew Jul 31, 2024
765ff9e
feat: Update certificate generation path
mayura-andrew Jul 31, 2024
96af9b9
Update certificate generation path
mayura-andrew Jul 31, 2024
ec04026
Merge branch 'main' into add-complete-status
mayura-andrew Jul 31, 2024
3f5e282
feat: Update certificate generation path
mayura-andrew Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added certificates/certificate_template.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
subject: string
message: string
}
): any => {

Check warning on line 69 in src/utils.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type
const templatePath = path.join(__dirname, 'templates', `${templateName}.ejs`)

return new Promise<string>((resolve, reject) => {
Expand Down Expand Up @@ -179,8 +179,8 @@
const uniqueId = randomUUID()
const pdfFileName = await generateCertificate(
name,
'./src/certificates/certificate_template.pdf',
`./src/certificates/mentee/${uniqueId}_certificate.pdf`
'./certificates/certificate_template.pdf',
`./certificates/${uniqueId}_certificate.pdf`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the certificates directory doesn't exist?

)
return {
subject: 'Congratulations! You have completed ScholarX',
Expand Down
Loading