chore: port fix to selfhost-desktop
This commit is contained in:
committed by
Andrew Bastin
parent
8844d52f5f
commit
ce9ea0cbc7
@@ -112,10 +112,15 @@ function exportedCollectionToHoppCollection(
|
|||||||
folders: restCollection.folders.map((folder) =>
|
folders: restCollection.folders.map((folder) =>
|
||||||
exportedCollectionToHoppCollection(folder, collectionType)
|
exportedCollectionToHoppCollection(folder, collectionType)
|
||||||
),
|
),
|
||||||
requests: restCollection.requests.map(
|
requests: restCollection.requests.map((request) => {
|
||||||
({
|
const requestParsedResult = HoppRESTRequest.safeParse(request)
|
||||||
id,
|
if (requestParsedResult.type === "ok") {
|
||||||
|
return requestParsedResult.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const {
|
||||||
v,
|
v,
|
||||||
|
id,
|
||||||
auth,
|
auth,
|
||||||
body,
|
body,
|
||||||
endpoint,
|
endpoint,
|
||||||
@@ -125,20 +130,23 @@ function exportedCollectionToHoppCollection(
|
|||||||
params,
|
params,
|
||||||
preRequestScript,
|
preRequestScript,
|
||||||
testScript,
|
testScript,
|
||||||
}) => ({
|
requestVariables,
|
||||||
id,
|
} = request
|
||||||
|
return {
|
||||||
v,
|
v,
|
||||||
auth,
|
id,
|
||||||
body,
|
|
||||||
endpoint,
|
|
||||||
headers,
|
|
||||||
method,
|
|
||||||
name,
|
name,
|
||||||
|
endpoint,
|
||||||
|
method,
|
||||||
params,
|
params,
|
||||||
|
requestVariables: requestVariables,
|
||||||
|
auth,
|
||||||
|
headers,
|
||||||
|
body,
|
||||||
preRequestScript,
|
preRequestScript,
|
||||||
testScript,
|
testScript,
|
||||||
})
|
}
|
||||||
),
|
}),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const gqlCollection = collection as ExportedUserCollectionGQL
|
const gqlCollection = collection as ExportedUserCollectionGQL
|
||||||
|
|||||||
@@ -124,35 +124,35 @@ function exportedCollectionToHoppCollection(
|
|||||||
const requestParsedResult = HoppRESTRequest.safeParse(request)
|
const requestParsedResult = HoppRESTRequest.safeParse(request)
|
||||||
if (requestParsedResult.type === "ok") {
|
if (requestParsedResult.type === "ok") {
|
||||||
return requestParsedResult.value
|
return requestParsedResult.value
|
||||||
} else {
|
}
|
||||||
const {
|
|
||||||
v,
|
const {
|
||||||
id,
|
v,
|
||||||
auth,
|
id,
|
||||||
body,
|
auth,
|
||||||
endpoint,
|
body,
|
||||||
headers,
|
endpoint,
|
||||||
method,
|
headers,
|
||||||
name,
|
method,
|
||||||
params,
|
name,
|
||||||
preRequestScript,
|
params,
|
||||||
testScript,
|
preRequestScript,
|
||||||
requestVariables,
|
testScript,
|
||||||
} = request
|
requestVariables,
|
||||||
return {
|
} = request
|
||||||
v,
|
return {
|
||||||
id,
|
v,
|
||||||
name,
|
id,
|
||||||
endpoint,
|
name,
|
||||||
method,
|
endpoint,
|
||||||
params,
|
method,
|
||||||
requestVariables: requestVariables,
|
params,
|
||||||
auth,
|
requestVariables: requestVariables,
|
||||||
headers,
|
auth,
|
||||||
body,
|
headers,
|
||||||
preRequestScript,
|
body,
|
||||||
testScript,
|
preRequestScript,
|
||||||
}
|
testScript,
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
auth: data.auth,
|
auth: data.auth,
|
||||||
|
|||||||
Reference in New Issue
Block a user