export const RequiresAuth = async (_, res, next) => { if (!res.locals.userId) { return res.status(400).send({ error: "No token found" }); } return next(); };