tagpage: fix pagination
This commit is contained in:
parent
e15c16434c
commit
d43195b52d
@ -27,7 +27,6 @@ export default {
|
||||
};
|
||||
|
||||
total = (await sql("items")
|
||||
.select("items.id", "items.mime", "st.tag")
|
||||
.innerJoin(
|
||||
sql("tags")
|
||||
.select("tags_assign.item_id", "tags.tag")
|
||||
@ -38,9 +37,9 @@ export default {
|
||||
"st.item_id", "items.id"
|
||||
)
|
||||
.whereRaw(modequery)
|
||||
.groupBy('items.id', 'st.tag', 'st.item_id')
|
||||
.groupBy('st.tag', 'st.item_id')
|
||||
.count("* as total")
|
||||
)[0]?.total;
|
||||
)?.length;
|
||||
}
|
||||
else {
|
||||
if(!o.fav) {
|
||||
@ -120,12 +119,9 @@ export default {
|
||||
)
|
||||
.groupBy('st.item_id', 'items.id', 'tags_assign.tag_id');
|
||||
}
|
||||
|
||||
|
||||
rows = await rows;
|
||||
|
||||
|
||||
|
||||
|
||||
if(rows.length === 0)
|
||||
return {
|
||||
success: false,
|
||||
|
Loading…
Reference in New Issue
Block a user