From b512ecf6d0399fdc86aebbad533006ea6fe4af21 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Tue, 23 Jun 2026 16:14:21 +0000
Subject: [PATCH] adding route /api/ping

---
 app.js              |    2 +-
 test/testApiPing.js |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app.js b/app.js
index 5c21238..5f97e1f 100644
--- a/app.js
+++ b/app.js
@@ -339,7 +339,7 @@
 
    /////// system ////////////////////////////////////////////////////////////////
 
-   .post("/api/ping", async function (req, res) {
+   .get("/api/ping", async function (req, res) {
       try {
          const res2 = await libIlias.ping()
          return res.send(res2)
diff --git a/test/testApiPing.js b/test/testApiPing.js
index 06670ed..19d5374 100644
--- a/test/testApiPing.js
+++ b/test/testApiPing.js
@@ -12,13 +12,13 @@
 
 describe("using the API", function () {
 
-    describe("the Route POST /api/ping", function () {
+    describe("the Route GET /api/ping", function () {
 
         it("should return an answer from php component", async function () {
             const url = getUrl(ref_id)
             console.log(url)
             const res = await fetch(url, {
-                method: "POST",
+                method: "GET",
                 body: JSON.stringify({}),
                 headers: {
                     'Content-Type': 'application/json', // Indicate JSON data

--
Gitblit v1.8.0