jsjsjsjsjsjs

This commit is contained in:
Joscha Maier 2024-09-26 12:48:40 +02:00
parent dcdd9af271
commit 004143280b
No known key found for this signature in database
GPG Key ID: 8C4D045D84A30ABA

View File

@ -259,7 +259,7 @@ async function uploadToPackageRegistry(done) {
/* Publish to FoundryVTT
/* ----------------------------------------- */
function publishToFoundry(done) {
async function publishToFoundry(done) {
const moduleManifestPath = 'system.json';
const moduleManifest = JSON.parse(fs.readFileSync(moduleManifestPath));
@ -299,7 +299,7 @@ function publishToFoundry(done) {
}
// Send the POST request to Foundry VTT API
const response = fetch('https://api.foundryvtt.com/_api/packages/release', {
const response = await fetch('https://api.foundryvtt.com/_api/packages/release', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@ -308,7 +308,7 @@ function publishToFoundry(done) {
body: JSON.stringify(payload),
});
const responseData = response.json();
const responseData = await response.json();
if (responseData.status === 'success') {
console.log('Successfully published to Foundry VTT:');