fix total f0cks in profile

This commit is contained in:
Flummi 2024-06-24 08:41:13 +02:00
parent 2ff1842d09
commit c79cca18cf

View File

@ -7,12 +7,13 @@ import url from "url";
const globalfilter = cfg.nsfp.map(n => `tag_id = ${n}`).join(' or ');
export default {
getf0cks: async (o = { user, tag, mime, page, mode, fav, session }) => {
getf0cks: async (o = { user, tag, mime, page, mode, fav, session, limit }) => {
const user = o.user ? decodeURI(o.user) : null;
const tag = lib.parseTag(o.tag ?? null);
const mime = o.mime ?? null;
const page = +(o.page ?? 1);
const smime = cfg.allowedMimes.includes(mime) ? mime + "/%" : mime === "" ? "%" : "%";
const eps = o.limit ?? cfg.websrv.eps;
const tmp = { user, tag, mime, smime, page, mode: o.mode };
const modequery = mime == "audio" ? lib.getMode(0) : lib.getMode(o.mode ?? 0);
@ -70,7 +71,7 @@ export default {
group by items.id, tags.tag, ta.tag_id
order by items.id desc
offset ${offset}
limit ${cfg.websrv.eps}
limit ${eps}
`;
const cheat = [];