mirror of
https://github.com/fawazahmed0/exchange-api.git
synced 2025-06-30 10:33:50 +00:00
create currenciesDir before saving files in it
This commit is contained in:
parent
6ecb76b5cb
commit
841a934311
@ -185,6 +185,9 @@ function sortObjByKeys(obj) {
|
||||
// Generates the api files
|
||||
async function generateFiles(googBingCurrJSON) {
|
||||
const currenciesDir = path.join(rootDir, 'currencies')
|
||||
fs.mkdirSync(currenciesDir, {
|
||||
recursive: true
|
||||
})
|
||||
for (const [fromKey, fromValue] of Object.entries(googBingCurrJSON)) {
|
||||
const tempObj = {}
|
||||
tempObj['date'] = dateToday;
|
||||
|
Loading…
Reference in New Issue
Block a user