Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 38bc0c55c8 | |||
| 9fb4219418 |
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "multi-stub",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "multi-stub",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.9",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "multi-stub",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -21,4 +21,14 @@ router.post('/', requiredValidate('title'), async (req, res) => {
|
||||
res.send(getAnswer(null, list))
|
||||
})
|
||||
|
||||
router.get('/list', async (req, res) => {
|
||||
const items = await ListModel
|
||||
.find({})
|
||||
.populate('items')
|
||||
.exec()
|
||||
|
||||
res.send(getAnswer(null, items))
|
||||
})
|
||||
|
||||
|
||||
module.exports = router
|
||||
|
||||
Reference in New Issue
Block a user