REST Service for POPCORN - ILIAS
alex
2025-06-15 e11dc9345a753d43e8ab92638fad392ec546b8bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* Lib for interacting with customized ILIAS php */
 
module.exports = {
   deleteUser,
}
 
/////////////////////////////////////////////////////////////////////////
 
const settings = require("../settings")
const {url} = settings.ilias
 
/////////////////////////////////////////////////////////////////////////
 
async function deleteUser (obj_id, dry = false) {
   const sp = new URLSearchParams({
      command: "deleteUser",
      obj_id,
      dry : dry ? 1 : 0,
   })
   let url2 = `${url}?${sp.toString()}`
   console.log("libIlias.deleteUser >>>", url2)
   const res = await fetch(url2, {method: "DELETE"})
   // console.log(res)
   const data = await res.json()
   return data
}