Import postman variables correctly (#1142)
Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
@@ -139,6 +139,8 @@ export default {
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
} else if (collections.info && collections.info.schema.includes("v2.1.0")) {
|
} else if (collections.info && collections.info.schema.includes("v2.1.0")) {
|
||||||
|
//replace the variables, postman uses {{var}}, Hoppscotch uses <<var>>
|
||||||
|
collections = JSON.parse(content.replaceAll(/{{([a-z]+)}}/gi, '<<$1>>'))
|
||||||
collections = this.parsePostmanCollection(collections)
|
collections = this.parsePostmanCollection(collections)
|
||||||
} else {
|
} else {
|
||||||
return this.failedImport()
|
return this.failedImport()
|
||||||
|
|||||||
Reference in New Issue
Block a user