it's working!!!

This commit is contained in:
MLH
2025-04-06 15:27:27 +02:00
parent 68c55593b3
commit a976c2f200
9 changed files with 506 additions and 252 deletions

View File

@ -27,10 +27,11 @@ router.get('/', async (req, res) => {
});
// POST /api/todos - Create a new todo for the logged-in user
router.post('/', async (req, res) => {
router.post('/newEntry', async (req, res) => {
const userId = req.user.id;
const { task } = req.body;
console.log('Received task:', task); // Log the received task for debugging
if (!task || task.trim() === '') {
return res.status(400).json({ message: 'Aufgabeninhalt darf nicht leer sein.' });
}