mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
db/events: don't add tags to query unless they exist
This commit is contained in:
parent
19901eb828
commit
a82ae40c43
1 changed files with 5 additions and 3 deletions
|
|
@ -43,9 +43,11 @@ function insertEvent(event: Event): Promise<void> {
|
||||||
return results;
|
return results;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
await trx.insertInto('tags')
|
if (tags.length) {
|
||||||
.values(tags)
|
await trx.insertInto('tags')
|
||||||
.execute();
|
.values(tags)
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue