Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
Project Page
Commits
1be48bfb
Commit
1be48bfb
authored
Jul 04, 2022
by
Rosanny Sihombing
Browse files
cleaning the codes
parent
ed0d511b
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/config/config.ts
View file @
1be48bfb
...
...
@@ -75,3 +75,5 @@ module.exports = {
// to be defined
}
}
export
{}
src/config/dbconn.ts
View file @
1be48bfb
...
...
@@ -37,4 +37,4 @@ const dbconn = {
project
:
projectConnection
}
export
{
dbconn
}
export
{
dbconn
}
src/controller/controller.ts
View file @
1be48bfb
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment