issue #52
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 15s
All checks were successful
fetch npm modules / f0ck the f0cker (push) Successful in 15s
This commit is contained in:
parent
2301d15abd
commit
5eeaa28612
|
@ -32,7 +32,7 @@ export default {
|
|||
${ o.fav ? db`and "user".user ilike ${'%'+user+'%'}` : db`` }
|
||||
${ !o.fav && user ? db`and items.username ilike ${'%'+user+'%'}` : db`` }
|
||||
${ mime ? db`and items.mime ilike ${smime}` : db`` }
|
||||
${ !o.session ? 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`` }
|
||||
group by items.id, tags.tag
|
||||
`)?.length || 0;
|
||||
|
||||
|
@ -66,7 +66,7 @@ export default {
|
|||
${ o.fav ? db`and "user".user ilike ${'%'+user+'%'}` : db`` }
|
||||
${ !o.fav && user ? db`and items.username ilike ${'%'+user+'%'}` : db`` }
|
||||
${ mime ? db`and items.mime ilike ${smime}` : db`` }
|
||||
${ !o.session ? 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`` }
|
||||
group by items.id, tags.tag, ta.tag_id
|
||||
order by items.id desc
|
||||
offset ${offset}
|
||||
|
@ -128,7 +128,7 @@ export default {
|
|||
${ o.fav ? db`and "user".user ilike ${'%'+user+'%'}` : db`` }
|
||||
${ !o.fav && user ? db`and items.username ilike ${'%'+user+'%'}` : db`` }
|
||||
${ mime ? db`and items.mime ilike ${smime}` : db`` }
|
||||
${ !o.session ? 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`` }
|
||||
group by items.id, tags.tag, ta.tag_id
|
||||
order by items.id desc
|
||||
`;
|
||||
|
@ -224,7 +224,7 @@ export default {
|
|||
${ 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`` }
|
||||
${ !o.session ? 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`` }
|
||||
group by items.id, tags.tag
|
||||
order by random()
|
||||
limit 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user