From 67eaec91f85979a3819786595fd9ea9ffdbb075d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 17 Jun 2024 10:31:36 +0900 Subject: [PATCH] wip --- src/routers/taskRouter.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/routers/taskRouter.ts b/src/routers/taskRouter.ts index f8f3f74..24bc5bf 100644 --- a/src/routers/taskRouter.ts +++ b/src/routers/taskRouter.ts @@ -51,4 +51,13 @@ router.get('/', (req, res) => { } }); - +router.post('/', (req, res) => { + const body = req.body; + if (!body) { + res.status(400).json({ + message: '不正なリクエスト: リクエストボディが空です' + }); + return; + } + // TODO: implement +});