Reapply Base64 encoding to /api/list
This commit is contained in:
@@ -201,9 +201,12 @@ app.get('/api/list', async (req, res, next) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
const data = (await fs.readdir(path.join(savePath))).map((v) => {
|
||||||
|
return Buffer.from(v, 'hex').toString('utf-8')
|
||||||
|
})
|
||||||
res.send({
|
res.send({
|
||||||
success: true,
|
success: true,
|
||||||
content: await fs.readdir(path.join(savePath))
|
content: data
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
next(error);
|
next(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user