REST Service for POPCORN - ILIAS
alex
2025-06-05 960e78503c15e28923fed128ffa054ab5e5f7004
app.js
@@ -65,6 +65,20 @@
         return res.code(404).send({status: "error", msg: "not found"})
      }
   })
   .get("/api/user/teilnahmen/:userId", async function (req, res) {
      let userId = req.params.userId
      console.log(`--------${userId}-----------`, typeof userId)
      if(!userId || isNaN(Number(userId))) {
         return res.code(500).send({status: "error", msg: "userId error"})
      }
      const tn = await db.getUserTeilnahmen(userId)
      if (tn) {
         return res.send(tn)
      }
      else {
         return res.code(404).send({status: "error", msg: "not found"})
      }
   })
   /////// ref_id / obj_id  ////////////////////////////////////////////////////////////////