Reapply Base64 encoding to /api/list

This commit is contained in:
Yuhwan Kim
2024-06-05 02:22:05 +09:00
parent de5d6a32bf
commit 7f3045bccb

View File

@@ -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);