add nav router
This commit is contained in:
parent
02eb0e60b7
commit
815f11d5bc
@ -5,9 +5,11 @@ const router = Router()
|
||||
const todoRouter = require('./routes')
|
||||
const authRouter = require('./auth')
|
||||
const commentRouter = require('./comment')
|
||||
const navRouter = require('./nav')
|
||||
|
||||
router.use('/auth', authRouter)
|
||||
router.use('/comment', commentRouter)
|
||||
router.use('/nav', navRouter)
|
||||
|
||||
router.use(todoRouter)
|
||||
|
||||
|
51
server/routers/todo/nav/index.js
Normal file
51
server/routers/todo/nav/index.js
Normal file
@ -0,0 +1,51 @@
|
||||
const router = require("express").Router();
|
||||
|
||||
router.get("/users", (req, res) => {
|
||||
res.send({
|
||||
success: false,
|
||||
body: [
|
||||
{
|
||||
id: "some-user-id",
|
||||
name: "alexandr",
|
||||
age: 38,
|
||||
surname: null,
|
||||
email: null,
|
||||
rated: 4,
|
||||
avatar:
|
||||
"https://www.gravatar.com/avatar/6529e885535ef67a3fad810ad71167c2c03f79480936e9b3a714731753cbb47e?d=robohash",
|
||||
friends: [
|
||||
{
|
||||
id: "2",
|
||||
name: "not alexandr",
|
||||
surname: null,
|
||||
email: null,
|
||||
rated: 2,
|
||||
avatar: "https://www.gravatar.com/avatar/6e?d=robohash",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
name: "not alexandr",
|
||||
surname: null,
|
||||
email: null,
|
||||
age: 24,
|
||||
rated: 5,
|
||||
avatar: "https://www.gravatar.com/avatar/6e?d=robohash",
|
||||
friends: [
|
||||
{
|
||||
id: "some-user-id",
|
||||
name: "alexandr",
|
||||
surname: null,
|
||||
email: null,
|
||||
rated: 3,
|
||||
avatar:
|
||||
"https://www.gravatar.com/avatar/6529e885535ef67a3fad810ad71167c2c03f79480936e9b3a714731753cbb47e?d=robohash",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
})
|
||||
})
|
||||
|
||||
module.exports = router
|
Loading…
Reference in New Issue
Block a user