Make use of single argument Object

This commit is contained in:
Liyas Thomas
2020-06-11 20:47:49 +05:30
parent 0644a8c9fb
commit eb760b37e6

View File

@@ -177,7 +177,7 @@ export default {
icon: "error", icon: "error",
}) })
}, },
parsePostmanCollection({ item, info, name }, folders = true) { parsePostmanCollection(collection, folders = true) {
let postwomanCollection = folders let postwomanCollection = folders
? [ ? [
{ {
@@ -190,13 +190,13 @@ export default {
name: "", name: "",
requests: [], requests: [],
} }
for (let collectionItem of item) { for (let collectionItem of collection.item) {
if (collectionItem.request) { if (collectionItem.request) {
if (postwomanCollection[0]) { if (postwomanCollection[0]) {
postwomanCollection[0].name = info ? info.name : "" postwomanCollection[0].name = collection.info ? collection.info.name : ""
postwomanCollection[0].requests.push(this.parsePostmanRequest(collectionItem)) postwomanCollection[0].requests.push(this.parsePostmanRequest(collectionItem))
} else { } else {
postwomanCollection.name = name ? name : "" postwomanCollection.name = collection.name ? collection.name : ""
postwomanCollection.requests.push(this.parsePostmanRequest(collectionItem)) postwomanCollection.requests.push(this.parsePostmanRequest(collectionItem))
} }
} else if (collectionItem.item) { } else if (collectionItem.item) {