chore: cleanup
This commit is contained in:
@@ -302,12 +302,6 @@ const saveRequestAs = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
if (updateRequestResult.right.type === "invalid") {
|
||||
// REQUEST_INVALIDATED | REQUEST_PATH_NOT_FOUND
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// These remain here in the component
|
||||
RESTTabs.currentActiveTab.value.document = {
|
||||
request: updatedRequest,
|
||||
|
||||
@@ -547,19 +547,6 @@ const saveRequest = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
const resultHandle = updateRequestResult.right
|
||||
|
||||
if (resultHandle.type === "invalid") {
|
||||
// REQUEST_INVALIDATED | REQUEST_PATH_NOT_FOUND
|
||||
|
||||
if (resultHandle.reason === "REQUEST_PATH_NOT_FOUND") {
|
||||
// REQUEST_PATH_NOT_FOUND
|
||||
tab.value.document.saveContext = undefined
|
||||
await saveRequest()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
tab.value.document.isDirty = false
|
||||
|
||||
tab.value.document.saveContext = {
|
||||
|
||||
@@ -779,11 +779,6 @@ const onEditRequest = async (newRequestName: string) => {
|
||||
return
|
||||
}
|
||||
|
||||
if (result.right.type === "invalid") {
|
||||
// REQUEST_INVALIDATED
|
||||
return
|
||||
}
|
||||
|
||||
displayModalEditRequest(false)
|
||||
toast.success(t("request.renamed"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user