check #37
| @ -6,7 +6,7 @@ const { getAnswer } = require('../../utils/common') | |||||||
| 
 | 
 | ||||||
| const router = Router() | const router = Router() | ||||||
| 
 | 
 | ||||||
|  // http://localhost:8033/todo/list
 |  // test - http://localhost:8033/todo/list
 | ||||||
| router.get('/list', async (req, res) => { | router.get('/list', async (req, res) => { | ||||||
|   const items = await ListModel |   const items = await ListModel | ||||||
|     .find({}) |     .find({}) | ||||||
| @ -16,7 +16,7 @@ router.get('/list', async (req, res) => { | |||||||
|   res.send(getAnswer(null, items)) |   res.send(getAnswer(null, items)) | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| // http://localhost:8033/todo/list/create/new%20List%20Name
 | // test - http://localhost:8033/todo/list/create/new%20List%20Name
 | ||||||
| router.get('/list/create/:title', async (req, res) => { | router.get('/list/create/:title', async (req, res) => { | ||||||
|   const { title } = req.params |   const { title } = req.params | ||||||
| 
 | 
 | ||||||
| @ -25,7 +25,7 @@ router.get('/list/create/:title', async (req, res) => { | |||||||
|   res.send(getAnswer(null, list)) |   res.send(getAnswer(null, list)) | ||||||
| }) | }) | ||||||
| 
 | 
 | ||||||
| // http://localhost:8033/todo/item/create/:listId/new%20one
 | // test - http://localhost:8033/todo/item/create/:listId/new%20one
 | ||||||
| router.get('/item/create/:listId/:name', async (req, res, next) => { | router.get('/item/create/:listId/:name', async (req, res, next) => { | ||||||
|   const { name, listId } = req.params |   const { name, listId } = req.params | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user