master #50

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

View File

@ -17,7 +17,7 @@ export default (router, tpl) => {
total = (await db` total = (await db`
select count(*) as total select count(*) as total
from "items" from "items"
where src ilike ${'%' + tag.substring(4) + '%'} where src ilike ${'%' + tag.substring(4) + '%'} and active = 'true'
group by "items".id group by "items".id
`).length; `).length;
} }
@ -42,7 +42,7 @@ export default (router, tpl) => {
from "items" from "items"
where where
src ilike ${'%' + tag.substring(4) + '%'} and src ilike ${'%' + tag.substring(4) + '%'} and
active = 1 active = 'true'
group by "items".id group by "items".id
order by "items".id desc order by "items".id desc
offset ${offset} offset ${offset}
@ -55,7 +55,7 @@ export default (router, tpl) => {
from "tags" from "tags"
left join "tags_assign" on "tags_assign".tag_id = "tags".id left join "tags_assign" on "tags_assign".tag_id = "tags".id
left join "items" on "items".id = "tags_assign".item_id left join "items" on "items".id = "tags_assign".item_id
where "tags".tag ilike ${'%' + tag + '%'} and "items".active = 1 where "tags".tag ilike ${'%' + tag + '%'} and "items".active = 'true'
group by "items".id, "tags".tag group by "items".id, "tags".tag
offset ${offset} offset ${offset}
limit ${_eps} limit ${_eps}