Merge branch 'main' of https://github.com/hoppscotch/hoppscotch
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
export function hasPathParams(params) {
|
||||
return params.some(({ type }) => type === "path")
|
||||
return params
|
||||
.filter((item) => (item.hasOwnProperty("active") ? item.active == true : true))
|
||||
.some(({ type }) => type === "path")
|
||||
}
|
||||
|
||||
export function addPathParamsToVariables(params, variables) {
|
||||
params
|
||||
.filter((item) => (item.hasOwnProperty("active") ? item.active == true : true))
|
||||
.filter(({ key }) => !!key)
|
||||
.filter(({ type }) => type === "path")
|
||||
.forEach(({ key, value }) => (variables[key] = value))
|
||||
@@ -11,5 +14,8 @@ export function addPathParamsToVariables(params, variables) {
|
||||
}
|
||||
|
||||
export function getQueryParams(params) {
|
||||
return params.filter(({ key }) => !!key).filter(({ type }) => type != "path")
|
||||
return params
|
||||
.filter((item) => (item.hasOwnProperty("active") ? item.active == true : true))
|
||||
.filter(({ key }) => !!key)
|
||||
.filter(({ type }) => type != "path")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user