From 8503a2239ec51969b2c7dff39befe27d95d79cdb Mon Sep 17 00:00:00 2001 From: kalugin66 Date: Tue, 3 Feb 2026 09:11:50 +0500 Subject: [PATCH] type --- task-endpoints.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/task-endpoints.js b/task-endpoints.js index 0544ebf..9919a5d 100644 --- a/task-endpoints.js +++ b/task-endpoints.js @@ -703,6 +703,15 @@ app.get('/api/document-approval-tasks', requireAuth, (req, res) => { app.post('/api/tasks', requireAuth, upload.array('files', 15), (req, res) => { const { title, description, assignedUsers, originalTaskId, dueDate } = req.body; const createdBy = req.session.user.id; + + // ПРОВЕРКА ЧТО ПРИХОДИТ В ЗАПРОСЕ + console.log('📋 ДАННЫЕ ИЗ ЗАПРОСА:'); + console.log('req.body:', JSON.stringify(req.body, null, 2)); + console.log('req.body.taskType:', req.body.taskType); + console.log('Все поля req.body:', Object.keys(req.body)); + + // Проверяем заголовки запроса + console.log('Content-Type заголовок:', req.headers['content-type']); if (!title) { return res.status(400).json({ error: 'Название задачи обязательно' });