feat: Nambahin template certificate endpoint

This commit is contained in:
Rafi Athallah
2026-06-25 18:47:40 +07:00
parent 955545876f
commit d86164f8df
8 changed files with 474 additions and 1 deletions
@@ -95,6 +95,19 @@ class CertificateRepository {
});
}
async findProjectById(id_project) {
return prisma.project.findUnique({
where: { id: parseInt(id_project) },
});
}
async updateProjectTemplate(id_project, templatePath) {
return prisma.project.update({
where: { id: parseInt(id_project) },
data: { certificate_template: templatePath },
});
}
certificateDetailInclude() {
return {
user: {
@@ -109,6 +122,7 @@ class CertificateRepository {
id: true,
project_name: true,
description: true,
certificate_template: true,
},
},
};