feat: Nambahin template certificate endpoint
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user