Adjust junk drawer styles

This commit is contained in:
2024-10-01 18:18:39 -06:00
parent 9394e1cc5a
commit 9090a07aa5
4 changed files with 87 additions and 51 deletions

View File

@@ -40,6 +40,13 @@ export class JunkDrawerController {
@Render('junk-drawer/view')
async viewJunkDrawer(@Param('slug') slug: string): Promise<any> {
const metadata = await this.junkDrawerService.getJunkDrawerMetadata(slug);
if (!metadata) {
return { error: 'File not found or expired' };
}
metadata.items = metadata.items.map((item) => ({
...item,
isImage: item.mimetype.startsWith('image/'),
}));
return { ...metadata };
}