fix recovery order

This commit is contained in:
Flummi 2023-07-28 11:52:58 +02:00
parent 1380e45794
commit 81e7d50a6b

View File

@ -182,6 +182,7 @@ export default (router, tpl) => {
from "items"
where
active = 'false'
order by id desc
`;
if(_posts.length === 0) {
@ -190,7 +191,10 @@ export default (router, tpl) => {
});
}
const posts = await Promise.all(_posts.map(async p => ({ ...p, thumbnail: (await fs.readFile(`./deleted/t/${p.id}.webp`)).toString('base64') })));
const posts = await Promise.all(_posts.map(async p => ({
...p,
thumbnail: (await fs.readFile(`./deleted/t/${p.id}.webp`)).toString('base64')
})));
res.reply({
body: tpl.render('admin/recover', {