mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 06:44:21 +00:00
🔧 Default to PATCH
for commands and actions
This commit is contained in:
parent
cd50706f5e
commit
f21305d311
1 changed files with 2 additions and 2 deletions
|
@ -325,7 +325,7 @@ export function useManagedViewSet<Resource extends DjangoResource>(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<Resource extends DjangoResource>(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) {
|
||||
|
|
Loading…
Reference in a new issue