add: added some ui improvements

This commit is contained in:
Lukian 2025-05-12 20:48:55 +02:00
parent 8d6e1f8618
commit b707e2cead
21 changed files with 236 additions and 121 deletions

View file

@ -84,6 +84,10 @@ router.get('/:name', async (req, res) => {
return res.status(404).send({ error: 'Emoji not found' });
}
if (!fs.existsSync(`data/emojis/${emoji[0].file}`)) {
return res.sendFile(path.join(__dirname, `../images/default.png`), { headers: { 'Content-Type': 'image' } });
}
res.sendFile(path.join(__dirname, `../data/emojis/${emoji[0].file}`), { headers: { 'Content-Type': 'image' } });
});