From 839a62cf5a607751d9839383848eeec872e98d50 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 10 Oct 2021 16:10:59 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Default=20to=20`PATCH`=20for=20c?= =?UTF-8?q?ommands=20and=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/hooks/useManagedViewSet.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/hooks/useManagedViewSet.ts b/frontend/src/hooks/useManagedViewSet.ts index d99e493..f7e8dfe 100644 --- a/frontend/src/hooks/useManagedViewSet.ts +++ b/frontend/src/hooks/useManagedViewSet.ts @@ -325,7 +325,7 @@ export function useManagedViewSet(baseRoute: st let response: Resource[] try { - response = await viewset.command({url: `${baseRoute}${command}/`, data}) + response = await viewset.command({url: `${baseRoute}${command}/`, data, method: "PATCH"}) } catch(err) { @@ -467,7 +467,7 @@ export function useManagedViewSet(baseRoute: st let response: Resource try { - response = await viewset.action({url: `${baseRoute}${pk}/${act}/`, data}) + response = await viewset.action({url: `${baseRoute}${pk}/${act}/`, data, method: "PATCH"}) } catch(err) {