feat: Add DB
This commit is contained in:
11
utils/db/write-to-file.js
Normal file
11
utils/db/write-to-file.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const fs = require('fs')
|
||||
|
||||
module.exports = async function ({ data, filePath }) {
|
||||
await fs.writeFile(filePath, data, error => {
|
||||
if (error) {
|
||||
throw new Error(`Error writing to file: ${error}`)
|
||||
}
|
||||
})
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user