Skip to content

Commit

Permalink
Use same coding style for encoding as in jobs and datasets requests
Browse files Browse the repository at this point in the history
Signed-off-by: Maarten Hubrechts <maarten.hubrechts@hotmail.com>
  • Loading branch information
MaartenHubrechts committed Nov 21, 2024
1 parent 6ee88f2 commit 3791cca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions web/src/store/requests/columnlineage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ export const getColumnLineage = async (
name: string,
depth: number
) => {
const nodeId = generateNodeId(nodeType, namespace, name)
// Node ID cannot be URL encoded
const encodedNamespace = encodeURIComponent(namespace)
const encodedName = encodeURIComponent(name)
const nodeId = generateNodeId(nodeType, encodedNamespace, encodedName)
const url = `${API_URL}/column-lineage?nodeId=${nodeId}&depth=${depth}&withDownstream=true`
return genericFetchWrapper(url, { method: 'GET' }, 'fetchColumnLineage')
}
4 changes: 3 additions & 1 deletion web/src/store/requests/lineage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export const getLineage = async (
name: string,
depth: number
) => {
const nodeId = generateNodeId(nodeType, encodeURIComponent(namespace), encodeURIComponent(name))
const encodedNamespace = encodeURIComponent(namespace)
const encodedName = encodeURIComponent(name)
const nodeId = generateNodeId(nodeType, encodedNamespace, encodedName)
const url = `${API_URL}/lineage?nodeId=${nodeId}&depth=${depth}`
return genericFetchWrapper(url, { method: 'GET' }, 'fetchLineage')
}

0 comments on commit 3791cca

Please sign in to comment.