Compare commits

..

2 Commits

Author SHA1 Message Date
Primakov Alexandr Alexandrovich
38bc0c55c8 1.1.0 2025-01-18 16:52:14 +03:00
Primakov Alexandr Alexandrovich
9fb4219418 todo list get list 2025-01-18 16:52:10 +03:00
3 changed files with 13 additions and 3 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "multi-stub", "name": "multi-stub",
"version": "1.0.1", "version": "1.1.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "multi-stub", "name": "multi-stub",
"version": "1.0.1", "version": "1.1.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"axios": "^1.7.9", "axios": "^1.7.9",

View File

@ -1,6 +1,6 @@
{ {
"name": "multi-stub", "name": "multi-stub",
"version": "1.0.1", "version": "1.1.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -21,4 +21,14 @@ router.post('/', requiredValidate('title'), async (req, res) => {
res.send(getAnswer(null, list)) 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 module.exports = router