mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
confirm each tag in auth event
This commit is contained in:
parent
6f35e2e1e2
commit
dd98d2adc6
1 changed files with 1 additions and 1 deletions
|
@ -307,7 +307,7 @@ const eventController = {
|
|||
if (body.tags) {
|
||||
await Tag.bulkCreate(body.tags.map(t => ({ tag: t, confirmed: !!req.user })), { ignoreDuplicates: true })
|
||||
const tags = await Tag.findAll({ where: { tag: { [Op.in]: body.tags } } })
|
||||
await Promise.all(tags.map(t => t.update({ weigth: Number(t.weigth) + 1 })))
|
||||
await Promise.all(tags.map(t => t.update({ weigth: Number(t.weigth) + 1, confirmed: true })))
|
||||
await event.addTags(tags)
|
||||
event.tags = tags
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue