🔧 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);
}
let data = {files: {}};
data.files[core.getInput('filename')] = {
content: JSON.stringify(description)
};
data = JSON.stringify(data);
let data = JSON.stringify({
files: {[core.getInput('filename')]: {content: JSON.stringify(description)}}
});
const req = http.request(
{