docs: Fix incorrect variable in documentation

This commit is contained in:
Joachim Van Herwegen 2023-10-20 15:14:38 +02:00
parent 762d703df7
commit 61b8d4a7e8

View File

@ -32,7 +32,7 @@ This only needs to be done once, afterwards this token can be used for all futur
// as described in the API documentation.
const indexResponse = await fetch('http://localhost:3000/.account/', { headers: { cookie }});
const { controls } = await indexResponse.json();
const res = await fetch(controls.account.clientCredentials, {
const response = await fetch(controls.account.clientCredentials, {
method: 'POST',
headers: { cookie, 'content-type': 'application/json' },
// The name field will be used when generating the ID of your token.