Commit 1be48bfb authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

cleaning the codes

parent ed0d511b
......@@ -75,3 +75,5 @@ module.exports = {
// to be defined
}
}
export {}
......@@ -37,4 +37,4 @@ const dbconn = {
project: projectConnection
}
export {dbconn}
export { dbconn }
......@@ -19,7 +19,7 @@ const controller = {
},
getProjectOverviewById: async function (projectId: number) {
try {
const rows: any = await dbconn.project.promise().query('CALL GetProjectInformationByProjectID(' + projectId + ')')
const rows: any = await dbconn.project.promise().query('CALL GetProjectInformationByProjectID(' + String(projectId) + ')')
if (rows[0][0]) {
return rows[0][0]
} else { return null }
......@@ -29,7 +29,7 @@ const controller = {
},
getProjectImagesById: async function (projectId: number) {
try {
const rows: any = await dbconn.project.promise().query('CALL getImagesByProjectID(' + projectId + ')')
const rows: any = await dbconn.project.promise().query('CALL getImagesByProjectID(' + String(projectId) + ')')
if (rows[0][0]) {
return rows[0][0]
} else { return null }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment