REST Service for POPCORN - ILIAS
alex
2025-06-18 2eac54c720449180449b238bcb4854105ee76f78
lib/libIlias.js
@@ -11,7 +11,7 @@
const settings = require("../settings")
const {getObjIdFromRefId} = require("./db")
const db = require("./db")
const {url} = settings.ilias
const {url, iliastoken} = settings.ilias
/////////////////////////////////////////////////////////////////////////
@@ -21,15 +21,17 @@
      obj_id,
      // dry: "1",
      dry: dry ? "1" : "0",
      token: iliastoken,
   })
   let url2 = `${url}?${sp.toString()}`
   const res = await fetch(url2, {method: "DELETE"})
   const data = await res.json()
   // TODO update search index
   return data //
}
async function deleteAllUsers () {
   const users = await db.getUsers()
   const {data: users} = await db.getUsers(0, 100000)
   const res = {
      command: "deleteAllUsers",
      start: new Date(),
@@ -45,6 +47,7 @@
   }
   res.end = new Date()
   res.duration = res.end - res.start
   // TODO update search index
   return res
}
@@ -55,6 +58,7 @@
      obj_id,
      usr_id,
      dry: dry ? "1" : "0",
      token: iliastoken,
   })
   let url2 = `${url}?${sp.toString()}`
   console.log("libIlias.deleteTeilnahme >>>", url2)