diff --git a/packages/hoppscotch-common/src/components/collections/SaveRequest.vue b/packages/hoppscotch-common/src/components/collections/SaveRequest.vue index 6abc98bb6..47c53be9c 100644 --- a/packages/hoppscotch-common/src/components/collections/SaveRequest.vue +++ b/packages/hoppscotch-common/src/components/collections/SaveRequest.vue @@ -267,16 +267,11 @@ const saveRequestAs = async () => { return } - const { providerID, requestID, workspaceID } = requestHandle.value.data - RESTTabs.currentActiveTab.value.document = { request: updatedRequest, isDirty: false, saveContext: { originLocation: "workspace-user-collection", - workspaceID, - providerID, - requestID, requestHandle, }, } @@ -313,16 +308,12 @@ const saveRequestAs = async () => { return } - const { providerID, requestID, workspaceID } = requestHandle.value.data - RESTTabs.currentActiveTab.value.document = { request: updatedRequest, isDirty: false, saveContext: { originLocation: "workspace-user-collection", - workspaceID, - providerID, - requestID, + requestHandle, }, } diff --git a/packages/hoppscotch-common/src/components/http/Request.vue b/packages/hoppscotch-common/src/components/http/Request.vue index a9d2363cb..9449d1f74 100644 --- a/packages/hoppscotch-common/src/components/http/Request.vue +++ b/packages/hoppscotch-common/src/components/http/Request.vue @@ -525,24 +525,7 @@ const saveRequest = async () => { return } - const { requestID } = saveContext - - const requestHandleResult = await newWorkspaceService.getRequestHandle( - newWorkspaceService.activeWorkspaceHandle.value, - requestID - ) - - if (E.isLeft(requestHandleResult)) { - // INVALID_COLLECTION_HANDLE | INVALID_REQUEST_ID | REQUEST_NOT_FOUND - showSaveRequestModal.value = true - - if (!tab.value.document.isDirty) { - tab.value.document.isDirty = true - } - return - } - - const requestHandle = requestHandleResult.right + const requestHandle = ref(saveContext.requestHandle) if (!requestHandle.value) { return diff --git a/packages/hoppscotch-common/src/components/http/RequestTab.vue b/packages/hoppscotch-common/src/components/http/RequestTab.vue index f009f96d8..4427a04d3 100644 --- a/packages/hoppscotch-common/src/components/http/RequestTab.vue +++ b/packages/hoppscotch-common/src/components/http/RequestTab.vue @@ -17,10 +17,11 @@