@@ -21,7 +21,7 @@ export async function profileJson(
|
||||
'Content-Type': 'application/json',
|
||||
'X-XSRF-TOKEN': cookie ? decodeURIComponent(cookie.slice(11)) : '',
|
||||
},
|
||||
body: method === 'GET' ? undefined : JSON.stringify(data),
|
||||
...(method === 'GET' ? {} : { body: JSON.stringify(data) }),
|
||||
});
|
||||
const result = await response.json();
|
||||
if (!response.ok)
|
||||
|
||||
Reference in New Issue
Block a user