Skip to content

Commit c33f330

Browse files
authored
Update getUsers.js
1 parent 8807b44 commit c33f330

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

api/user/getUsers.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,27 @@ console.log('users', users);
44

55
module.exports = (req, res) => {
66

7-
res.send({
8-
"data": users
7+
res.json({
8+
"data": [{
9+
"_id": "540000198212061166",
10+
"username": "冯霞",
11+
"age": 28
12+
}, {
13+
"_id": "360000198410117032",
14+
"username": "张静",
15+
"age": 28
16+
}, {
17+
"_id": "510000198812169757",
18+
"username": "唐霞",
19+
"age": 23
20+
}, {
21+
"_id": "540000201002128195",
22+
"username": "陆平",
23+
"age": 24
24+
}, {
25+
"_id": "990000200708037438",
26+
"username": "乔涛",
27+
"age": 23
28+
}]
929
})
1030
}

0 commit comments

Comments
 (0)