REST Service for POPCORN - ILIAS
alex
2025-10-23 951966febb19bad7a8581393fe09ee34909cc621
app.js
@@ -68,7 +68,9 @@
    })
fastify
    /////// USER ////////////////////////////////////////////////////////////////
    .get('/api/user', async function (req, res) {
        const {offset, limit, search} = req.query
        const users = await db.getUsers(offset, limit, search)
@@ -119,10 +121,6 @@
        return res.send(res2)
    })
    .delete("/api/user", async function (req, res) { // DELETE ALL users
        const res2 = await libIlias.deleteAllUsers()
        return res.send(res2)
    })
    .delete("/api/user/:usr_id", async function (req, res) {
        const {usr_id} = req.params
        if (!usr_id || isNaN(Number(usr_id))) {
@@ -277,6 +275,7 @@
        }
    })
    // abmelden
    .delete("/api/kurs/:refId/teilnehmer/:usrId", async function (req, res) {
        const {refId, usrId} = req.params
        if (!refId || !usrId) throw {status: "error", msg: "refId and usrId requried"}