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

cleaning the codes

parent ed0d511b
...@@ -75,3 +75,5 @@ module.exports = { ...@@ -75,3 +75,5 @@ module.exports = {
// to be defined // to be defined
} }
} }
export {}
...@@ -37,4 +37,4 @@ const dbconn = { ...@@ -37,4 +37,4 @@ const dbconn = {
project: projectConnection project: projectConnection
} }
export {dbconn} export { dbconn }
...@@ -19,7 +19,7 @@ const controller = { ...@@ -19,7 +19,7 @@ const controller = {
}, },
getProjectOverviewById: async function (projectId: number) { getProjectOverviewById: async function (projectId: number) {
try { 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]) { if (rows[0][0]) {
return rows[0][0] return rows[0][0]
} else { return null } } else { return null }
...@@ -29,7 +29,7 @@ const controller = { ...@@ -29,7 +29,7 @@ const controller = {
}, },
getProjectImagesById: async function (projectId: number) { getProjectImagesById: async function (projectId: number) {
try { 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]) { if (rows[0][0]) {
return rows[0][0] return rows[0][0]
} else { return null } } 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