Merge remote-tracking branch 'origin/dev'

This commit is contained in:
Flummi 2022-05-21 17:04:36 +02:00
commit 75c4e35fdc

View File

@ -27,7 +27,7 @@ export default {
left join "user" on "user".id = favorites.user_id
where
${ db.unsafe(modequery) }
${ tag ? db`and tags.normalized ilike ${'%'+tag+'%'}` : db`` }
${ tag ? db`and tags.normalized ilike '%' || slugify(${tag}) || '%'` : db`` }
${ o.fav ? db`and "user".user ilike ${'%'+user+'%'}` : db`` }
${ user ? db`and items.username ilike ${'%'+user+'%'}` : db`` }
${ mime ? db`and items.mime ilike ${smime}` : db`` }
@ -60,7 +60,7 @@ export default {
left join tags_assign ta on ta.item_id = items.id and (ta.tag_id = 1 or ta.tag_id = 2)
where
${ db.unsafe(modequery) }
${ tag ? db`and tags.normalized ilike ${'%'+tag+'%'}` : db`` }
${ tag ? db`and tags.normalized ilike '%' || slugify(${tag}) || '%'` : db`` }
${ o.fav ? db`and "user".user ilike ${'%'+user+'%'}` : db`` }
${ user ? db`and items.username ilike ${'%'+user+'%'}` : db`` }
${ mime ? db`and items.mime ilike ${smime}` : db`` }
@ -121,7 +121,7 @@ export default {
left join tags_assign ta on ta.item_id = items.id and (ta.tag_id = 1 or ta.tag_id = 2)
where
${ db.unsafe(modequery) }
${ tag ? db`and tags.normalized ilike ${'%'+tag+'%'}` : db`` }
${ tag ? db`and tags.normalized ilike '%' || slugify(${tag}) || '%'` : db`` }
${ o.fav ? db`and "user".user ilike ${'%'+user+'%'}` : db`` }
${ user ? db`and items.username ilike ${'%'+user+'%'}` : db`` }
${ mime ? db`and items.mime ilike ${smime}` : db`` }
@ -216,7 +216,7 @@ export default {
left join "user" on "user".id = favorites.user_id
where
${ db.unsafe(modequery) }
${ tag ? db`and tags.normalized ilike ${'%'+tag+'%'}` : db`` }
${ tag ? db`and tags.normalized ilike '%' || slugify(${tag}) || '%'` : db`` }
${ o.fav ? db`and "user".user ilike ${'%'+user+'%'}` : db`` }
${ user ? db`and items.username ilike ${'%'+user+'%'}` : db`` }
${ mime ? db`and items.mime ilike ${smime}` : db`` }