fix rest runMethod body logic

This commit is contained in:
lts20050703
2022-01-28 07:45:14 +07:00
parent 60023e1328
commit c49eed4890
+1 -1
View File
@@ -23,7 +23,7 @@ export async function runMethod<T = any>(
// For proxies we don't need to do any of the legwork so we just forward the request
if (!url.startsWith(`${BASE_URL}/v${API_VERSION}`) && !url.startsWith(IMAGE_BASE_URL)) {
const result = await fetch(url, {
body: JSON.stringify(body),
body: body ? JSON.stringify(body) : undefined,
headers: {
Authorization: rest.secretKey,
"Content-Type": "application/json",