From bbaca1a62526df6aeb9fbdccccab44cfd16dec80 Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Thu, 12 Jan 2023 17:50:14 +0100 Subject: [PATCH] docs(components/form): Fix method case in action (#9893) Closes https://github.com/remix-run/react-router/issues/9891 --- contributors.yml | 1 + docs/components/form.md | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contributors.yml b/contributors.yml index a7a87c2683..7b7e33fe23 100644 --- a/contributors.yml +++ b/contributors.yml @@ -104,6 +104,7 @@ - lukerSpringTree - m-shojaei - Manc +- machour - manzano78 - marc2332 - markivancho diff --git a/docs/components/form.md b/docs/components/form.md index 32602ab5e0..2907e688f9 100644 --- a/docs/components/form.md +++ b/docs/components/form.md @@ -132,12 +132,12 @@ The method will be available on [`request.method`][requestmethod] inside the rou }} action={async ({ request, params }) => { switch (request.method) { - case "put": { + case "PUT": { let formData = await request.formData(); let name = formData.get("projectName"); return fakeUpdateProject(name); } - case "delete": { + case "DELETE": { return fakeDeleteProject(params.id); } default: {