chore: cleanup

This commit is contained in:
jamesgeorge007
2024-02-12 10:35:54 +05:30
parent 2c47a63ca0
commit 97899ec023
4 changed files with 21 additions and 55 deletions

View File

@@ -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,

View File

@@ -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 = {

View File

@@ -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"))
}