soft delete v1
This commit is contained in:
@ -27,6 +27,7 @@ export default {
|
||||
left join "user" on "user".id = favorites.user_id
|
||||
where
|
||||
${ db.unsafe(modequery) }
|
||||
and items.active = 'true'
|
||||
${ 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`` }
|
||||
@ -60,6 +61,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) }
|
||||
and items.active = 'true'
|
||||
${ 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`` }
|
||||
@ -121,6 +123,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) }
|
||||
and items.active = 'true'
|
||||
${ 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`` }
|
||||
@ -216,6 +219,7 @@ export default {
|
||||
left join "user" on "user".id = favorites.user_id
|
||||
where
|
||||
${ db.unsafe(modequery) }
|
||||
and items.active = 'true'
|
||||
${ 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`` }
|
||||
|
Reference in New Issue
Block a user