Code formatting
This commit is contained in:
@@ -10,14 +10,13 @@ export const scheduleApi = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
console.log(`Request body: ${reqBody}`);
|
console.log(`Request body: ${reqBody}`);
|
||||||
const response = await fetch(`${API_BASE_URL}/api/v1/schedule/message`,
|
const response = await fetch(`${API_BASE_URL}/api/v1/schedule/message`, {
|
||||||
{
|
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: authBearerToken,
|
Authorization: authBearerToken,
|
||||||
},
|
},
|
||||||
body: JSON.stringify(reqBody)
|
body: JSON.stringify(reqBody),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@@ -25,7 +24,7 @@ export const scheduleApi = {
|
|||||||
} else {
|
} else {
|
||||||
return response.json();
|
return response.json();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -10,22 +10,24 @@ export const scheduleEventApi = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
console.log(`Request body: ${reqBody}`);
|
console.log(`Request body: ${reqBody}`);
|
||||||
const response = await fetch(`${API_BASE_URL}/api/v1/schedule/message/event`,
|
const response = await fetch(
|
||||||
|
`${API_BASE_URL}/api/v1/schedule/message/event`,
|
||||||
{
|
{
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: authBearerToken,
|
Authorization: authBearerToken,
|
||||||
},
|
},
|
||||||
body: JSON.stringify(reqBody)
|
body: JSON.stringify(reqBody),
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Error scheduling message event');
|
throw new Error('Error scheduling message event');
|
||||||
} else {
|
} else {
|
||||||
return response.json();
|
return response.json();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user