This commit is contained in:
WinterMyst 2024-09-26 13:38:38 +02:00
parent aa7a951ae1
commit e83c7b8ee0
No known key found for this signature in database
GPG Key ID: 8C4D045D84A30ABA

View File

@ -308,7 +308,12 @@ async function publishToFoundry(done) {
body: JSON.stringify(payload),
});
const responseData = await response.json();
let responseData;
if (contentType && contentType.includes('application/json')) {
responseData = await response.json();
} else {
responseData = await response.text();
}
if (responseData.status === 'success') {
console.log('Successfully published to Foundry VTT:');