Skip to content

Commit c8f6098

Browse files
authored
Merge pull request #618 from tapdata/fix-TAP-12298-v4.21.0
fix:Token is missing when exporting verification task
2 parents 5054263 + ade2c3d commit c8f6098

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/api/src/core/metadata-instances.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Cookie from '@tap/shared/src/cookie'
12
import { requestClient, type PageFetchResult } from '../request'
23

34
const BASE_URL = '/api/MetadataInstances'
@@ -16,8 +17,9 @@ export function updateMetadataInstanceClassification(params: any) {
1617

1718
export function downloadMetadataInstance(where: any, type: string) {
1819
if (typeof where === 'object') where = JSON.stringify(where)
20+
const accessToken = Cookie.get('access_token') as string | undefined
1921
window.open(
20-
`${BASE_URL}/download?where=${encodeURIComponent(where)}&type=${type}`,
22+
`${BASE_URL}/download?where=${encodeURIComponent(where)}&type=${type}&access_token=${encodeURIComponent(accessToken || '')}`,
2123
)
2224
}
2325

0 commit comments

Comments
 (0)