Skip to content

Commit 506b68e

Browse files
Update src/app/settings/api-tokens/APITokenModal.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 0020238 commit 506b68e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/settings/api-tokens/APITokenModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ function ServiceAccountLink() {
211211
}
212212

213213
function getCurlCommand(token: string, endpoint: string) {
214-
return `curl -H "Authorization: Bearer ${token}" ${endpoint}`;
214+
return `curl -H "Authorization: Bearer ${token}" "${encodeURI(endpoint)}"`;
215215
}
216216

217217
function getWgetCommand(token: string, endpoint: string) {
218-
return `wget --header="Authorization: Bearer ${token}" ${endpoint}`;
218+
return `wget --header="Authorization: Bearer ${token}" "${encodeURI(endpoint)}"`;
219219
}

0 commit comments

Comments
 (0)