From 4fc68e79740ee33989c8feb70bcb55465ed093a4 Mon Sep 17 00:00:00 2001
From: Jonas Leder <git@jonasled.de>
Date: Mon, 12 Apr 2021 20:10:29 +0200
Subject: [PATCH] add api endpoimt to get config value

---
 public/API/config.php | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 public/API/config.php

diff --git a/public/API/config.php b/public/API/config.php
new file mode 100644
index 0000000..e8a2ce7
--- /dev/null
+++ b/public/API/config.php
@@ -0,0 +1,18 @@
+<?php
+require "./lib/config.php";
+
+$configValue = $_GET['name'];
+
+switch ($configValue){
+    case "contactmail":
+        echo($contactmail);
+        break;
+    case "sitekey":
+        echo($sitekey);
+        break;
+    case "trackURL":
+        echo($trackurl);
+        break;
+    default:
+        echo("notFound");
+}
-- 
GitLab