Added missing dispatcher and function
This commit is contained in:
@@ -148,6 +148,16 @@ const dispatchers = defineDispatchers({
|
||||
},
|
||||
}
|
||||
},
|
||||
deleteVar(curr: RESTSession, { index }: { index: number }) {
|
||||
const newVars = curr.request.vars.filter((_x, i) => i !== index)
|
||||
|
||||
return {
|
||||
request: {
|
||||
...curr.request,
|
||||
vars: newVars,
|
||||
},
|
||||
}
|
||||
},
|
||||
deleteAllParams(curr: RESTSession) {
|
||||
return {
|
||||
request: {
|
||||
@@ -461,6 +471,15 @@ export function deleteRESTParam(index: number) {
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteRESTVar(index: number) {
|
||||
restSessionStore.dispatch({
|
||||
dispatcher: "deleteVar",
|
||||
payload: {
|
||||
index,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteAllRESTParams() {
|
||||
restSessionStore.dispatch({
|
||||
dispatcher: "deleteAllParams",
|
||||
|
||||
Reference in New Issue
Block a user