diff --git a/helpers/api/static.js b/helpers/api/static.js index 4972d6e..5c332e4 100644 --- a/helpers/api/static.js +++ b/helpers/api/static.js @@ -19,14 +19,13 @@ export async function downloadStorkToml () { // await axios( apiUrl.toString() ) - await axios({ + const response = await axios({ method: "get", url: apiUrl.toString(), - responseType: "stream" - }).then(function (response) { - response.data.pipe(fs.createWriteStream( storkTomlPath )) }) + await fs.writeFile( storkTomlPath, response.data, { encoding: null }) + // Get toml file stats const stats = await fs.stat( storkTomlPath ) console.log('TOML Stats', storkTomlPath, stats)