REST Service for POPCORN - ILIAS
alex
9 hours ago 07d24fc7a08276076495d90e1e0274a141acddbd
lib/libIlias.js
@@ -35,6 +35,7 @@
      token: iliastoken,
   })
   let url2 = `${url}?${sp.toString()}`
   console.log("pinging url", url2)
   const res = await fetch(url2, {method: "GET"})
   return await res.json() //
}
@@ -84,13 +85,16 @@
   const udfDef = await db.getUdf()
   const udfMap = _.keyBy(udfDef, "field_name")
   user.udf = _.mapKeys(user.udf, function (value, key) {
   // do not mutate the caller's user object
   const user2 = _.cloneDeep(user)
   user2.udf = _.mapKeys(user.udf, function (value, key) {
      return udfMap[key].field_id
   })
   const res = await fetch(url2, {
      method: "POST",
      body: JSON.stringify(user)
      body: JSON.stringify(user2)
   })
   const text = await res.text()
   try {