💾 Archived View for iich.space › src › middleware › withQuery.ts captured on 2021-12-03 at 14:04:38.
-=-=-=-=-=-=-
import { Status } from '@/gemini'; import { Handler } from '@/mission-control'; const withQuery = (meta: string, secure = false): Handler => (req, res) => { if (req.query === null || req.query.trim() === '') { res.sendStatus(secure ? Status.SENSITIVE_INPUT : Status.INPUT, meta); res.end(); } }; export default withQuery;