fix total f0cks in profile
This commit is contained in:
parent
2ff1842d09
commit
c79cca18cf
|
@ -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 = [];
|
||||
|
|
Loading…
Reference in New Issue
Block a user