REST Service for POPCORN - ILIAS
alex
2025-06-02 09781ff7ca439b0d24b4757d09e8325b48a9341c
app.js
@@ -50,6 +50,26 @@
         return res.code(404).send({status: "error", msg: "not found"})
      }
   })
   .get("/ref_id/:ref_id", async function (req, res) {
      const {ref_id} = req.params
      const data = await db.getObjIdFromRefId(ref_id)
      if (data) {
         return res.send(data)
      }
      else {
         return res.code(404).send({status: "error", msg: "not found"})
      }
   })
   .get("/obj_id/:obj_id", async function (req, res) {
      const {obj_id} = req.params
      let data = await db.getRefIdFromObjId(obj_id)
      if (data) {
         return res.send(data)
      }
      else {
         return res.code(404).send({status: "error", msg: "not found"})
      }
   })
/////////////////////////////////////////////////////////////////////////