We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0d56e5 commit cdf40d3Copy full SHA for cdf40d3
1 file changed
src/utils/api.ts
@@ -27,7 +27,7 @@ export async function apiFetch<T>(url: string, options: FetchOptions): Promise<A
27
const response = await fetch(url, {
28
method: options.method,
29
headers: {
30
- Authorization: `Bearer ${token}`,
+ ...(token ? { Authorization: `Bearer ${token}` } : {}),
31
"Content-Type": "application/json",
32
"Anytype-Version": currentApiVersion,
33
...options.headers,
0 commit comments