potential fix for the last fucked up commits xd

This commit is contained in:
x
2026-01-24 10:58:22 +01:00
parent 9c9309435d
commit 2229f32dd3
4 changed files with 18 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ export default router => {
mime ilike ${mime} and
active = 'true'
${isFav ? db`and fu."user" = ${user}` : db`and items.username ilike ${user}`}
${tag ? db`and tags.normalized ilike ${'%' + tag + '%'}` : db``}
${tag ? db`and tags.normalized ilike '%' || slugify(${tag}) || '%'` : db``}
${!hasSession && globalfilter ? db`and items.id not in (select item_id from tags_assign where item_id = items.id and (${db.unsafe(globalfilter)}))` : db``}
order by random()
limit 1