don't send authenticated request when the user is not authenticated
This commit is contained in:
parent
dcb0116c06
commit
54017dbcd9
@ -11,6 +11,8 @@ export const useAuthenticatedFetch = () => {
|
||||
body: object | null | undefined = null
|
||||
) => {
|
||||
const accessToken = await getToken();
|
||||
if (!accessToken) return;
|
||||
|
||||
const headers: HeadersInit = {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user