generated from lucien/api-template
add: added some ui improvements
This commit is contained in:
parent
8d6e1f8618
commit
b707e2cead
21 changed files with 236 additions and 121 deletions
|
@ -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' } });
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue