Merge pull request #43 from internship-humic/feat/intern-position-di-certif
feat: menambahkan intern_position di response modul certificate
This commit is contained in:
@@ -139,6 +139,7 @@ class CertificateRepository {
|
|||||||
id: true,
|
id: true,
|
||||||
full_name: true,
|
full_name: true,
|
||||||
email: true,
|
email: true,
|
||||||
|
intern_position: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
project: {
|
project: {
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ class CertificateService {
|
|||||||
project: certificate.project ? {
|
project: certificate.project ? {
|
||||||
id: certificate.project.id,
|
id: certificate.project.id,
|
||||||
project_name: certificate.project.project_name,
|
project_name: certificate.project.project_name,
|
||||||
|
intern_position: certificate.user ? certificate.user.intern_position : null,
|
||||||
description: certificate.project.description,
|
description: certificate.project.description,
|
||||||
certificate_template: certificate.project.certificate_template,
|
certificate_template: certificate.project.certificate_template,
|
||||||
start_date: certificate.project.start_date,
|
start_date: certificate.project.start_date,
|
||||||
@@ -357,6 +358,7 @@ class CertificateService {
|
|||||||
id: cert.user.id,
|
id: cert.user.id,
|
||||||
full_name: cert.user.full_name,
|
full_name: cert.user.full_name,
|
||||||
email: cert.user.email,
|
email: cert.user.email,
|
||||||
|
intern_position: cert.user.intern_position,
|
||||||
} : null,
|
} : null,
|
||||||
project: cert.project ? {
|
project: cert.project ? {
|
||||||
id: cert.project.id,
|
id: cert.project.id,
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ const router = express.Router();
|
|||||||
* email:
|
* email:
|
||||||
* type: string
|
* type: string
|
||||||
* example: "rafi@student.com"
|
* example: "rafi@student.com"
|
||||||
|
* intern_position:
|
||||||
|
* type: string
|
||||||
|
* example: "Backend Developer"
|
||||||
* project:
|
* project:
|
||||||
* type: object
|
* type: object
|
||||||
* properties:
|
* properties:
|
||||||
@@ -385,6 +388,9 @@ router.get('/project/:id_project', verifyJWT, isMentorOrAdmin, certificateContro
|
|||||||
* description:
|
* description:
|
||||||
* type: string
|
* type: string
|
||||||
* example: "Project to develop features of the Internify web app"
|
* example: "Project to develop features of the Internify web app"
|
||||||
|
* intern_position:
|
||||||
|
* type: string
|
||||||
|
* example: "Backend Developer"
|
||||||
* start_date:
|
* start_date:
|
||||||
* type: string
|
* type: string
|
||||||
* format: date
|
* format: date
|
||||||
|
|||||||
Reference in New Issue
Block a user