| | |
| | | return res.code(404).send({status: "error", msg: "not found"}) |
| | | } |
| | | }) |
| | | .get("/api/user/teilnahmen/:userId", async function (req, res) { |
| | | const {userid} = req.params |
| | | 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 //////////////////////////////////////////////////////////////// |
| | | |