Skip to content

Commit

Permalink
docs: fix colon in api key header (medusajs#10893)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahednasser authored Jan 9, 2025
1 parent a625bce commit 1ade80c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/apps/api-reference/markdown/admin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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}:`)}`,
},
})
```
Expand All @@ -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")
}`,
},
})
Expand Down

0 comments on commit 1ade80c

Please sign in to comment.