From 1ade80c3751d166deff46dcb8fd8ede0689da4a1 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Thu, 9 Jan 2025 13:38:24 +0200 Subject: [PATCH] docs: fix colon in api key header (#10893) --- www/apps/api-reference/markdown/admin.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/apps/api-reference/markdown/admin.mdx b/www/apps/api-reference/markdown/admin.mdx index 10b670564cdb3..2dae3f5b067ad 100644 --- a/www/apps/api-reference/markdown/admin.mdx +++ b/www/apps/api-reference/markdown/admin.mdx @@ -200,7 +200,7 @@ When using the JS SDK, you only need to specify the API key token in the [config ```js fetch(`{backend_url}/admin/products`, { headers: { - Authorization: `Basic ${window.btoa(`:${api_key_token}`)}`, + Authorization: `Basic ${window.btoa(`${api_key_token}:`)}`, }, }) ``` @@ -212,7 +212,7 @@ fetch(`{backend_url}/admin/products`, { fetch(`{backend_url}/admin/products`, { headers: { Authorization: `Basic ${ - Buffer.from(`:${api_key_token}`).toString("base64") + Buffer.from(`${api_key_token}:`).toString("base64") }`, }, })