possible user fav fix

This commit is contained in:
x
2026-01-24 01:16:49 +01:00
parent a8bb3e67f5
commit c822a4f4e7

View File

@@ -128,7 +128,7 @@ export default {
${db.unsafe(modequery)} ${db.unsafe(modequery)}
and items.active = 'true' and items.active = 'true'
${tag ? db`and tags.normalized ilike '%' || slugify(${tag}) || '%'` : db``} ${tag ? db`and tags.normalized ilike '%' || slugify(${tag}) || '%'` : db``}
${o.fav ? db`and "user"."user" = ${user}` : db``} ${o.fav ? db`and "user"."user" ilike ${user}` : db``}
${!o.fav && user ? db`and items.username ilike ${'%' + user + '%'}` : db``} ${!o.fav && user ? db`and items.username ilike ${'%' + user + '%'}` : db``}
${mime ? db`and items.mime ilike ${smime}` : db``} ${mime ? db`and items.mime ilike ${smime}` : db``}
${!o.session && globalfilter ? db`and items.id not in (select item_id from tags_assign where item_id = items.id and (${db.unsafe(globalfilter)}))` : db``} ${!o.session && globalfilter ? db`and items.id not in (select item_id from tags_assign where item_id = items.id and (${db.unsafe(globalfilter)}))` : db``}