Showing curated campaigns on tags page.

This commit is contained in:
2024-06-17 01:28:20 +02:00
parent 64bf3b65ac
commit f9b7a8731e
7 changed files with 81 additions and 25 deletions

View File

@@ -1,6 +1,11 @@
export default function consentHandler(req, res, next) {
const redirect = req.headers.referer && new URL(req.headers.referer).searchParams.get('redirect');
if (req.path.includes('/api')) {
next();
return;
}
if (Object.hasOwn(req.query, 'lgbt')) {
const lgbtFilters = (req.tagFilter || []).filter((tag) => !['gay', 'bisexual', 'transsexual'].includes(tag));