fix tags for new images

This commit is contained in:
Zutatensuppe 2021-06-03 00:01:42 +02:00
parent 57a1e9f24d
commit b88321bb1b
2 changed files with 4 additions and 2 deletions

View file

@ -182,7 +182,8 @@ app.post('/api/upload', (req, res): void => {
})
if (req.body.tags) {
setImageTags(db, imageId as number, req.body.tags)
const tags = req.body.tags.split(',').filter((tag: string) => !!tag)
setImageTags(db, imageId as number, tags)
}
res.send(Images.imageFromDb(db, imageId as number))