Skip to content

Commit 27c412a

Browse files
committed
PullRequest: 702 fix: add encodeURIComponent in path
Merge branch 'fix/encodeUrl of [email protected]:oceanbase/oceanbase-developer-center.git into dev-4.3.3 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/702 Signed-off-by: 晓康 <[email protected]> * fix: add encodeURIComponent in path
1 parent 4947f2e commit 27c412a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/common/network/sensitiveColumn.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ export interface IScannResult {
110110

111111
export async function getScanningResults(projectId: number, taskId: string): Promise<IScannResult> {
112112
const ret = await request.get(
113-
`/api/v2/collaboration/projects/${projectId}/sensitiveColumns/getScanningResults?taskId=${taskId}`,
113+
`/api/v2/collaboration/projects/${projectId}/sensitiveColumns/getScanningResults?taskId=${encodeURIComponent(
114+
taskId,
115+
)}`,
114116
);
115117
return ret?.data;
116118
}

src/store/sql/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ export class SQLStore {
414414
}) {
415415
const sid = generateDatabaseSid(params.dbName, params.sessionId);
416416
const res = await request.post(
417-
`/api/v2/connect/sessions/${sid}/currentDatabase/batchCompilations`,
417+
`/api/v2/connect/sessions/${encodeURIComponent(sid)}/currentDatabase/batchCompilations`,
418418
{
419419
data: params,
420420
},
@@ -426,7 +426,7 @@ export class SQLStore {
426426
public async getBatchCompilePLResult(id: string, sessionId: string, dbName: string) {
427427
const sid = generateDatabaseSid(dbName, sessionId);
428428
const res = await request.get(
429-
`/api/v2/connect/sessions/${sid}/currentDatabase/batchCompilations/${id}`,
429+
`/api/v2/connect/sessions/${encodeURIComponent(sid)}/currentDatabase/batchCompilations/${id}`,
430430
);
431431
return res?.data;
432432
}
@@ -435,7 +435,7 @@ export class SQLStore {
435435
public async deleteBatchCompilePL(id: string, sessionId: string, dbName: string) {
436436
const sid = generateDatabaseSid(dbName, sessionId);
437437
const res = await request.delete(
438-
`/api/v2/connect/sessions/${sid}/currentDatabase/batchCompilations/${id}`,
438+
`/api/v2/connect/sessions/${encodeURIComponent(sid)}/currentDatabase/batchCompilations/${id}`,
439439
);
440440
return res?.data;
441441
}

0 commit comments

Comments
 (0)