This commit is contained in:
Primakov Alexandr Alexandrovich
2024-12-05 22:55:59 +03:00
parent 9723c825f7
commit cf2eb88662
8 changed files with 63 additions and 2881 deletions

View File

@@ -21,7 +21,7 @@ export const connect = async () => {
});
lists.forEach(async (list) => {
await (list as unknown as any).addItem(item._id);
await (list as unknown as any).addItem(item);
})
}

View File

@@ -59,7 +59,7 @@ router.post('/:listId/item', async (req, res) => {
description
});
await (list as any).addItem(item._id);
await (list as any).addItem(item);
res.send(item)
})

View File

@@ -1,5 +1,4 @@
import { Router } from "express";
import { Validator } from "express-json-validator-middleware";
import bkfd2Password from "pbkdf2-password";
import jwt from 'jsonwebtoken'
@@ -11,8 +10,6 @@ const hasher = bkfd2Password();
export const router = Router();
const { validate } = new Validator({});
const user = {
type: "object",
required: ["name"],