master #50

Merged
schrumpel merged 101 commits from master into dev 2022-10-22 23:40:03 +00:00
Showing only changes of commit 75c4e35fdc - Show all commits

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`` }