Skip to content
GitLab
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
2 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
cleaning the codes
parent
ed0d511b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/config/config.ts
+2
-0
src/config/config.ts
src/config/dbconn.ts
+1
-1
src/config/dbconn.ts
src/controller/controller.ts
+2
-2
src/controller/controller.ts
with
5 additions
and
3 deletions
+5
-3
src/config/config.ts
+
2
-
0
View file @
1be48bfb
...
...
@@ -75,3 +75,5 @@ module.exports = {
// to be defined
}
}
export
{}
This diff is collapsed.
Click to expand it.
src/config/dbconn.ts
+
1
-
1
View file @
1be48bfb
...
...
@@ -37,4 +37,4 @@ const dbconn = {
project
:
projectConnection
}
export
{
dbconn
}
export
{
dbconn
}
This diff is collapsed.
Click to expand it.
src/controller/controller.ts
+
2
-
2
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
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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