From 04dfb0fe5e1c88e8aafa07a28b459df4ecaecdf1 Mon Sep 17 00:00:00 2001 From: Alexander Ziskind Date: Thu, 10 Jan 2019 08:07:38 -0500 Subject: [PATCH] removed old console.logs --- app/server.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/app/server.ts b/app/server.ts index b9bf1ba..eb411d8 100644 --- a/app/server.ts +++ b/app/server.ts @@ -292,9 +292,6 @@ router.post('/task', (req: Request, res: Response) => { const newTask = req.body.task as PtTask; const itemId = parseInt(req.body.itemId, undefined); - // tslint:disable-next-line:no-console - console.log('new task title: ' + newTask.title); - const foundItem = currentPtItems.find((i) => i.id === itemId && i.dateDeleted === undefined); if (foundItem) { @@ -333,12 +330,6 @@ router.put('/task/:id', (req: Request, res: Response) => { const modifiedTask = req.body.task as PtTask; const itemId = parseInt(req.body.itemId, undefined); - // tslint:disable-next-line:no-console - console.log('updated task title: ' + modifiedTask.title); - - // tslint:disable-next-line:no-console - console.log('updated task complete: ' + modifiedTask.completed); - const foundItem = currentPtItems.find((i) => i.id === itemId && i.dateDeleted === undefined); if (foundItem) { @@ -380,8 +371,7 @@ router.post('/task/:itemId/:id', (req: Request, res: Response) => { const foundItem = currentPtItems.find((i) => i.id === itemId && i.dateDeleted === undefined); if (foundItem) { let found = false; - // tslint:disable-next-line:no-console - console.log('found item' + foundItem.tasks.length); + const updatedTasks = foundItem.tasks.map((t) => { if (t.id === taskId) { found = true; @@ -392,8 +382,6 @@ router.post('/task/:itemId/:id', (req: Request, res: Response) => { return deletedTask; } else { return t; } }); - // tslint:disable-next-line:no-console - console.log('updated tasks item' + updatedTasks.length); const updatedItem = Object.assign({}, foundItem, { tasks: updatedTasks });