summaryrefslogtreecommitdiff
path: root/pages/api.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-10-10 20:51:39 +0200
committerMinteck <contact@minteck.org>2022-10-10 20:51:39 +0200
commit108525534c28013cfe1897c30e4565f9893f3766 (patch)
treedd3e5132971f96ab5f05e7f3f8f6dbbf379a19bd /pages/api.php
parent2162eaa06f7e4764eb3dcfe130ec2c711d0c62ab (diff)
downloadpluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.gz
pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.bz2
pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.zip
Update
Diffstat (limited to 'pages/api.php')
-rw-r--r--pages/api.php17
1 files changed, 0 insertions, 17 deletions
diff --git a/pages/api.php b/pages/api.php
deleted file mode 100644
index 1d83985..0000000
--- a/pages/api.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-
-if (str_ends_with($_GET['_'], "/")) {
- $pagename = substr($_GET['_'], 0, strlen($_GET['_']) - 1);
-} else {
- $pagename = $_GET['_'];
-}
-
-$toplevel = explode("/", $pagename)[1];
-
-if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php")) {
- require_once $_SERVER['DOCUMENT_ROOT'] . "/api/" . $toplevel . ".php";
-} else {
- header("HTTP/1.1 500 Internal Server Error");
- echo("Endpoint not found");
- die();
-} \ No newline at end of file