From aa14f96c083e22335d1f22c0d64c1fe84fbc580f Mon Sep 17 00:00:00 2001 From: t-94 Date: Fri, 12 Aug 2022 07:10:02 +0900 Subject: [PATCH] typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit アロー関数式 => 関数式に修正 --- docs/api-routes/introduction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-routes/introduction.md b/docs/api-routes/introduction.md index 8984aac4..1a0d3c7a 100644 --- a/docs/api-routes/introduction.md +++ b/docs/api-routes/introduction.md @@ -22,7 +22,7 @@ API ルートは Next.js で**API**を構築する方法を提供しています 例えば、以下の API ルート `pages/api/user.js` は `json` レスポンスを `200` ステータスコードとともに返します: ```js -export default function handler(req, res) => { +export default function handler(req, res) { res.status(200).json({ name: 'John Doe' }) }; ``` @@ -35,7 +35,7 @@ API ルートを使用するためには、関数(**リクエストハンドラ* API ルートで異なる HTTP メソッドを処理するには、次のようにリクエストハンドラの `req.method` を使うことができます: ```js -export default function handler(req, res) => { +export default function handler(req, res) { if (req.method === 'POST') { // POSTリクエストを処理します } else {