refactor: eliminate collectionID from tab saveContext

Collection ID can be inferred from request ID by removing last index from the path.
This commit is contained in:
jamesgeorge007
2024-02-24 17:37:12 +05:30
parent c30ee5becc
commit d70d5bdb16
6 changed files with 77 additions and 80 deletions

View File

@@ -267,8 +267,7 @@ const saveRequestAs = async () => {
return
}
const { collectionID, providerID, requestID, workspaceID } =
requestHandle.value.data
const { providerID, requestID, workspaceID } = requestHandle.value.data
RESTTabs.currentActiveTab.value.document = {
request: updatedRequest,
@@ -277,7 +276,6 @@ const saveRequestAs = async () => {
originLocation: "workspace-user-collection",
workspaceID,
providerID,
collectionID,
requestID,
},
}
@@ -314,8 +312,7 @@ const saveRequestAs = async () => {
return
}
const { collectionID, providerID, requestID, workspaceID } =
requestHandle.value.data
const { providerID, requestID, workspaceID } = requestHandle.value.data
RESTTabs.currentActiveTab.value.document = {
request: updatedRequest,
@@ -324,7 +321,6 @@ const saveRequestAs = async () => {
originLocation: "workspace-user-collection",
workspaceID,
providerID,
collectionID,
requestID,
},
}