Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
kouling-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
刘松
kouling-admin
Commits
b7117971
Commit
b7117971
authored
Dec 01, 2017
by
刘松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qd fix
parent
a3fd00bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
tao-link.js
db/mongo/tao-link.js
+2
-1
controller.js
lib/controller.js
+1
-2
No files found.
db/mongo/tao-link.js
View file @
b7117971
...
...
@@ -4,7 +4,8 @@ const {ObjectId} = mongoose.SchemaTypes;
const
schema
=
mongoose
.
Schema
({
name
:
{
type
:
String
,
required
:
true
required
:
true
,
unique
:
true
},
quan
:
{
type
:
String
,
...
...
lib/controller.js
View file @
b7117971
...
...
@@ -121,7 +121,7 @@ exports.createLink = async (req, res, next) => {
exports
.
getSchedules
=
async
(
req
,
res
,
next
)
=>
{
let
{
limit
=
100
,
skip
=
0
,
sort
=
{
'updatedAt'
:
-
1
}}
=
req
.
query
;
let
options
=
{
limit
:
parseInt
(
limit
),
skip
:
parseInt
(
skip
),
sort
};
let
schedules
=
await
Schedule
.
find
({},
null
,
options
).
populate
(
'links'
,
'name title target'
);
let
schedules
=
await
Schedule
.
find
({},
null
,
options
).
populate
(
'links'
,
'name title target'
)
.
populate
(
'qd'
,
'user'
)
;
let
total
=
await
Schedule
.
count
({},
null
);
res
.
send
({
status
:
'ok'
,
result
:
schedules
,
pagination
:{
total
:
total
,
skip
:
skip
,
limit
:
limit
}});
}
...
...
@@ -156,7 +156,6 @@ exports.createSchedule = async (req, res, next) => {
}
});
Promise
.
all
(
tkl_Tasks
).
then
(
function
(
arrs
){
console
.
dir
(
'----'
);
arrs
.
map
(
x
=>
x
.
toJSON
());
res
.
send
({
status
:
'ok'
,
result
:
result
,
kls
:
arrs
});
});
...
...
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