Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
fengchao-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
tf-boys
fengchao-admin
Commits
a3e17d25
Commit
a3e17d25
authored
Aug 08, 2017
by
刘松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update statistics
parent
0132de15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
index.js
config/index.js
+8
-2
statistics.js
lib/statistics.js
+1
-1
No files found.
config/index.js
View file @
a3e17d25
module
.
exports
=
require
(
'./config.default.js'
);
'use strict'
;
\ No newline at end of file
try
{
module
.
exports
=
require
(
'./config_current.js'
);
}
catch
(
err
)
{
module
.
exports
=
require
(
'./config_default.js'
);
}
\ No newline at end of file
lib/statistics.js
View file @
a3e17d25
...
@@ -83,7 +83,7 @@ exports.detail = async(req,res,next) => {
...
@@ -83,7 +83,7 @@ exports.detail = async(req,res,next) => {
}
}
];
];
const
upstreams
=
await
upstream
.
aggregate
(
pipeline
);
const
upstreams
=
await
upstream
.
aggregate
(
pipeline
);
res
.
send
({
result
:
'ok'
,
data
:
{
users
:
users
.
map
(
x
=>
x
.
toJSON
()),
upstreams
:
upstreams
,
pagination
:{
current
:
parseInt
(
skip
),
total
:
total
,
pageSize
:
parseInt
(
limit
)}}})
res
.
send
({
result
:
'ok'
,
data
:
{
users
:
users
.
map
(
x
=>
x
.
toJSON
()),
upstreams
:
upstreams
,
pagination
:{
current
:
parseInt
(
skip
)
+
1
,
total
:
total
,
pageSize
:
parseInt
(
limit
)}}})
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
dir
(
err
);
console
.
dir
(
err
);
res
.
status
(
400
);
res
.
status
(
400
);
...
...
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