We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3457d42 commit 54db634Copy full SHA for 54db634
api/getusers.js
@@ -1,29 +1,9 @@
1
-// module.exports = (req, res) => {
2
-
3
-// res.json(
4
-// {
5
-// username: 'tom',
6
-// age: 30
7
-// }
8
-// )
9
10
11
-const Mock = require('mockjs')
12
13
-const {
14
- users
15
-} = Mock.mock({
16
- "users|5": [{
17
- "_id": "@id()",
18
- "username": "@cname()",
19
- "age|20-30": 30
20
- }]
21
-})
22
23
24
-// console.log('mock', users);
25
26
module.exports = (req, res) => {
27
28
- res.json(users)
+
+ res.json(
+ {
+ username: 'tom',
+ age: 30
+ }
+ )
29
}
0 commit comments