🔧 Use ES6 to create data object

This commit is contained in:
Simon Schneegans
2020-08-15 20:53:49 +02:00
parent 87f2cd9c28
commit 1b02acd6ac

View File

@@ -59,11 +59,9 @@ try {
description.cacheSeconds = parseInt(cacheSeconds); description.cacheSeconds = parseInt(cacheSeconds);
} }
let data = {files: {}}; let data = JSON.stringify({
data.files[core.getInput('filename')] = { files: {[core.getInput('filename')]: {content: JSON.stringify(description)}}
content: JSON.stringify(description) });
};
data = JSON.stringify(data);
const req = http.request( const req = http.request(
{ {