From 94fc1d0d195e86785b9342eebc2dcf7897108d55 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Mon, 16 Jun 2025 13:44:30 +0000
Subject: [PATCH] GS-1843

---
 lib/libIlias.js |    5 +++--
 app.js          |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/app.js b/app.js
index 3b298c8..45cbb9d 100644
--- a/app.js
+++ b/app.js
@@ -99,13 +99,13 @@
       }
    })
 
-   .delete("/api/user/:usr_id", function (req, res) {
+   .delete("/api/user/:usr_id", async function (req, res) {
       const {usr_id} = req.params
       if (!usr_id || isNaN(Number(usr_id))) {
          return res.code(500).send({status: "error", msg: "userId error"})
       }
       else {
-         const res2 = libIlias.deleteUser(usr_id)
+         const res2 = await libIlias.deleteUser(usr_id)
          console.log(res2)
          return res.send(res2)
       }
diff --git a/lib/libIlias.js b/lib/libIlias.js
index 6d608f5..4a5fe9b 100644
--- a/lib/libIlias.js
+++ b/lib/libIlias.js
@@ -17,12 +17,13 @@
    const sp = new URLSearchParams({
       command: "deleteUser",
       obj_id,
+      // dry: "1",
       dry: dry ? "1" : "0",
    })
    let url2 = `${url}?${sp.toString()}`
-   console.log("libIlias.deleteUser >>>", url2)
    const res = await fetch(url2, {method: "DELETE"})
-   return await res.json()
+   const data = await res.json()
+   return data
 }
 
 async function deleteTeilnahme (ref_id, usr_id, dry = false) {

--
Gitblit v1.8.0