Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qa-api
Commits
3a9c726b
Commit
3a9c726b
authored
Dec 16, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getLatestSvcDB 返回 json
parent
36cba627
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
dbsync.js
app/controller/dbsync.js
+2
-0
proconfig.js
app/controller/proconfig.js
+6
-1
No files found.
app/controller/dbsync.js
View file @
3a9c726b
...
...
@@ -13,6 +13,8 @@ let domainTKE = 'liangkebang.net'
const
getDBs
=
async
function
(
ctx
)
{
const
dbs
=
await
DBConfig
.
getDBName
()
dbs
.
unshift
({
dbname
:
'
all
'
})
dbs
.
unshift
({
dbname
:
'
latest
'
})
ctx
.
body
=
ctx
.
ok
(
dbs
)
}
...
...
app/controller/proconfig.js
View file @
3a9c726b
...
...
@@ -74,6 +74,7 @@ const save = async function (ctx) {
}
}
data
.
database
=
data
.
database
.
split
(
/ +/
).
join
(
'
'
)
await
ProConfig
.
saveProject
(
data
)
ctx
.
body
=
ctx
.
ok
()
}
...
...
@@ -174,7 +175,11 @@ const getLatestSvcDB = async (ctx) => {
}
}
const
latestDB
=
subSet
(
allDB
,
notLatestDB
)
ctx
.
body
=
latestDB
.
join
(
'
'
)
if
(
ctx
.
request
.
query
.
type
===
'
json
'
)
{
ctx
.
body
=
ctx
.
ok
(
latestDB
)
}
else
{
ctx
.
body
=
latestDB
.
join
(
'
'
)
}
}
const
router
=
new
Router
()
...
...
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