|
|
@@ -394,10 +394,10 @@ exports.backup = handleError(async (req, res) => {
|
|
|
const path = 'backup/' + new Date().getTime() + '-chunk.json'
|
|
|
const chunk = await chunkModel.find()
|
|
|
fs.writeFileSync(path, JSON.stringify(chunk))
|
|
|
- const { size } = fs.statSync(path)
|
|
|
- const mimetype = 'application/json'
|
|
|
- const buffer = fs.readFileSync(path)
|
|
|
- return { buffer, mimetype, size, originalname: 'chunk.json' }
|
|
|
+ // const { size } = fs.statSync(path)
|
|
|
+ // const mimetype = 'application/json'
|
|
|
+ // const buffer = fs.readFileSync(path)
|
|
|
+ // return { buffer, mimetype, size, originalname: 'chunk.json' }
|
|
|
})(),
|
|
|
(async () => {
|
|
|
const path = 'backup/' + new Date().getTime() + '-dokumen.json'
|