kubesail / pibox-host

6 stars 0 forks source link

audit all routes for auth and isOwner #16

Open pastudan opened 11 months ago

pastudan commented 11 months ago
  if (!(await middlewareAuth(req, res))) {
    return;
  }

  if (!req.isOwner) {
    return res.status(400).json({ error: "Only the owner can reset setup" });
  }