This commit is contained in:
Flummi 2022-01-02 14:29:26 +01:00
parent e72b86c981
commit d781290430

View File

@ -163,6 +163,12 @@ export default (router, tpl) => {
q = q.andWhere("user_id", req.session.id); q = q.andWhere("user_id", req.session.id);
const reply = !!(await q); const reply = !!(await q);
await sql('tags') // delete not used tags
.whereNotIn('id', sql('tags_assign').select('tag_id'))
.andWhereNot('tag', 'sfw')
.andWhereNot('tag', 'nsfw')
.del();
return res.reply({ body: JSON.stringify({ return res.reply({ body: JSON.stringify({
success: reply, success: reply,
tagid: tagid, tagid: tagid,