From d0ee9a146b1ad1b98876e2b6b7388685369dae70 Mon Sep 17 00:00:00 2001 From: Manuel Kamper Date: Fri, 2 Dec 2022 11:56:51 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eduplicate=5Fapi.php=E2=80=9C=20=C3=A4n?= =?UTF-8?q?dern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- duplicate_api.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/duplicate_api.php b/duplicate_api.php index efe22a0..54df750 100644 --- a/duplicate_api.php +++ b/duplicate_api.php @@ -124,6 +124,14 @@ if (isset($_GET['insertDuplicate'])) { response(999, "Database Error: " . $e->getMessage()); die(); } +} else if(isset($_GET['test'])) { + try { + $res = $db->query("select 'MySQL is working.' as Display;"); + response(200, "API is working properly.", NULL, NULL); + } catch (PDOException $e) { + response(999, "Database Error: " . $e->getMessage()); + die(); + } } else { response(400, "Error: Invalid Request"); }