Fix TOKEN variable reference with proper escaping
cgen-2de83cebacab45a4a9883f4fc9ceae62
This commit is contained in:
parent
20176ffb79
commit
e757f6e01b
1 changed files with 9 additions and 1 deletions
|
|
@ -160,7 +160,15 @@ export default function DocsApiReference() {
|
||||||
pagination headers for large result sets.
|
pagination headers for large result sets.
|
||||||
</p>
|
</p>
|
||||||
<pre className="rounded-lg border border-slate-700 bg-slate-950/60 p-4 text-sm text-teal-200">
|
<pre className="rounded-lg border border-slate-700 bg-slate-950/60 p-4 text-sm text-teal-200">
|
||||||
{'fetch("https://api.aethex.dev/v1/projects?page=1&limit=25", {\n headers: {\n Authorization: "Bearer ${TOKEN}",\n "AeThex-Environment": "production",\n },\n}).then(async (res) => {\n if (!res.ok) throw new Error(await res.text());\n console.log("Projects", await res.json());\n});'}
|
{`fetch("https://api.aethex.dev/v1/projects?page=1&limit=25", {
|
||||||
|
headers: {
|
||||||
|
Authorization: "Bearer \\${TOKEN}",
|
||||||
|
"AeThex-Environment": "production",
|
||||||
|
},
|
||||||
|
}).then(async (res) => {
|
||||||
|
if (!res.ok) throw new Error(await res.text());
|
||||||
|
console.log("Projects", await res.json());
|
||||||
|
});`}
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
Responses include{" "}
|
Responses include{" "}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue