From 622b753c55f71c49367d02c07b57904e9d146af1 Mon Sep 17 00:00:00 2001 From: Chhavi Goyal Date: Fri, 14 Mar 2025 04:16:04 -0400 Subject: [PATCH] fix: preserve hierarchy during personal collection imports (#4815) Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> --- .../src/platform/collections/desktop/gqlCollections.sync.ts | 1 + .../src/platform/collections/desktop/sync.ts | 1 + .../src/platform/collections/web/gqlCollections.sync.ts | 1 + .../hoppscotch-selfhost-web/src/platform/collections/web/sync.ts | 1 + 4 files changed, 4 insertions(+) diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/gqlCollections.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/gqlCollections.sync.ts index 229d2eee..b199604c 100644 --- a/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/gqlCollections.sync.ts +++ b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/gqlCollections.sync.ts @@ -115,6 +115,7 @@ const recursivelySyncCollections = async ( collection.id = childCollectionId collection.auth = returnedData.auth collection.headers = returnedData.headers + parentCollectionID = childCollectionId removeDuplicateGraphqlCollectionOrFolder( childCollectionId, diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/sync.ts index 60c1227d..2012e0d4 100644 --- a/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/sync.ts +++ b/packages/hoppscotch-selfhost-web/src/platform/collections/desktop/sync.ts @@ -120,6 +120,7 @@ const recursivelySyncCollections = async ( collection._ref_id = returnedData._ref_id ?? generateUniqueRefId("coll") collection.auth = returnedData.auth collection.headers = returnedData.headers + parentCollectionID = childCollectionId removeDuplicateRESTCollectionOrFolder( childCollectionId, diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/web/gqlCollections.sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/web/gqlCollections.sync.ts index 229d2eee..b199604c 100644 --- a/packages/hoppscotch-selfhost-web/src/platform/collections/web/gqlCollections.sync.ts +++ b/packages/hoppscotch-selfhost-web/src/platform/collections/web/gqlCollections.sync.ts @@ -115,6 +115,7 @@ const recursivelySyncCollections = async ( collection.id = childCollectionId collection.auth = returnedData.auth collection.headers = returnedData.headers + parentCollectionID = childCollectionId removeDuplicateGraphqlCollectionOrFolder( childCollectionId, diff --git a/packages/hoppscotch-selfhost-web/src/platform/collections/web/sync.ts b/packages/hoppscotch-selfhost-web/src/platform/collections/web/sync.ts index 60c1227d..2012e0d4 100644 --- a/packages/hoppscotch-selfhost-web/src/platform/collections/web/sync.ts +++ b/packages/hoppscotch-selfhost-web/src/platform/collections/web/sync.ts @@ -120,6 +120,7 @@ const recursivelySyncCollections = async ( collection._ref_id = returnedData._ref_id ?? generateUniqueRefId("coll") collection.auth = returnedData.auth collection.headers = returnedData.headers + parentCollectionID = childCollectionId removeDuplicateRESTCollectionOrFolder( childCollectionId,