fix: pick the corresponding REST collections to export from personal/team workspace

This commit is contained in:
jamesgeorge007
2023-12-19 11:57:19 +05:30
parent dacecf3c17
commit 75e2199cb5

View File

@@ -482,10 +482,6 @@ const HoppGistCollectionsExporter: ImporterOrExporter = {
isLoading: isHoppGistCollectionExporterInProgress,
},
action: async () => {
if (!myCollections.value.length) {
return toast.error(t("error.no_collections_to_export"))
}
isHoppGistCollectionExporterInProgress.value = true
const collectionJSON = await getCollectionJSON()
@@ -498,6 +494,11 @@ const HoppGistCollectionsExporter: ImporterOrExporter = {
}
if (E.isRight(collectionJSON)) {
if (!JSON.parse(collectionJSON.right).length) {
isHoppGistCollectionExporterInProgress.value = false
return toast.error(t("error.no_collections_to_export"))
}
const res = await gistExporter(collectionJSON.right, accessToken)
if (E.isLeft(res)) {