Skip to content

Commit

Permalink
fix(banner): split skip parameter on commas
Browse files Browse the repository at this point in the history
Betree committed Dec 6, 2024
1 parent d249ce5 commit f2435ce
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/server/controllers/banner.js
Original file line number Diff line number Diff line change
@@ -14,13 +14,12 @@ export default async function banner(req, res) {
const limit = Number(req.query.limit) || Infinity;
const width = Number(req.query.width) || 0;
const height = Number(req.query.height) || 0;
const skip = req.query.skip;
const { avatarHeight, margin } = req.query;
const showBtn = parseToBooleanDefaultTrue(req.query.button);

let skipUsers = skip || [];
if (!Array.isArray(skipUsers)) {
skipUsers = [skip];
let skipUsers = [];
if (req.query.skip) {
skipUsers = req.query.skip.split(',');
}

let contributors;

0 comments on commit f2435ce

Please sign in to comment.