diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-02 23:03:02 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-02 23:03:02 +0200 |
commit | 02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b (patch) | |
tree | 6d1dec61008998aadc6b69f7e750712794d99324 /pages/api/pluralkit-integration.php | |
parent | f559308a1b42a9036135d764374a8c007b7d70a9 (diff) | |
download | pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.tar.gz pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.tar.bz2 pluralconnect-02eda3e4c9b4ba718f1fff70b7328ed8cdd5e63b.zip |
Updated 35 files, added 11 files and deleted includes/components/search.inc (automated)
Diffstat (limited to 'pages/api/pluralkit-integration.php')
-rw-r--r-- | pages/api/pluralkit-integration.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/api/pluralkit-integration.php b/pages/api/pluralkit-integration.php index 0efa8cb..69d99b1 100644 --- a/pages/api/pluralkit-integration.php +++ b/pages/api/pluralkit-integration.php @@ -2,14 +2,14 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/agewarning.inc"; -$app = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); +$app = $GLOBALS["ColdHazeApp"]; $user = $_GET['user'] ?? null; $inputJSON = file_get_contents('php://input'); $input = json_decode($inputJSON, true); -$data = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["webhook"]; +$data = $GLOBALS["ColdHazeApp"]["webhook"]; -if (isset(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ponytown"][$user])) { - $ponytown = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ponytown"][$user]; +if (isset($GLOBALS["ColdHazeApp"]["ponytown"][$user])) { + $ponytown = $GLOBALS["ColdHazeApp"]["ponytown"][$user]; } else { header("HTTP/1.1 404 Not Found") and die(); } |