Code formatting
This commit is contained in:
@@ -10,14 +10,13 @@ export const scheduleApi = {
|
||||
};
|
||||
|
||||
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',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: authBearerToken,
|
||||
},
|
||||
body: JSON.stringify(reqBody)
|
||||
body: JSON.stringify(reqBody),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
@@ -25,7 +24,7 @@ export const scheduleApi = {
|
||||
} else {
|
||||
return response.json();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,22 +10,24 @@ export const scheduleEventApi = {
|
||||
};
|
||||
|
||||
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',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: authBearerToken,
|
||||
},
|
||||
body: JSON.stringify(reqBody)
|
||||
});
|
||||
body: JSON.stringify(reqBody),
|
||||
}
|
||||
);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Error scheduling message event');
|
||||
} else {
|
||||
return response.json();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user