summaryrefslogtreecommitdiff
path: root/pages/api/pluralkit-integration.php
diff options
context:
space:
mode:
Diffstat (limited to 'pages/api/pluralkit-integration.php')
-rw-r--r--pages/api/pluralkit-integration.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/api/pluralkit-integration.php b/pages/api/pluralkit-integration.php
index f5bb4dd..b7abc6b 100644
--- a/pages/api/pluralkit-integration.php
+++ b/pages/api/pluralkit-integration.php
@@ -43,20 +43,20 @@ $lastFronter = json_decode(@file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/incl
if ($input["type"] === "CREATE_SWITCH" || $input["type"] === "UPDATE_SWITCH" || $input["type"] === "DELETE_SWITCH") {
if ($system === $app["other"]["id"]) {
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/fronters.json", file_get_contents("https://pluralkit.equestria.dev/v2/systems/$input[system_id]/fronters"), false, stream_context_create([
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/fronters.json", file_get_contents("https://pluralkit.equestria.dev/v2/systems/$input[system_id]/fronters", false, stream_context_create([
'http' => [
'method' => 'GET',
'header' =>
"Authorization: " . $app["other"]["token"] . "\r\n"
]
- ]));
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/switches.json", file_get_contents("https://pluralkit.equestria.dev/v2/systems/$input[system_id]/switches"), false, stream_context_create([
+ ])));
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/switches.json", file_get_contents("https://pluralkit.equestria.dev/v2/systems/$input[system_id]/switches", false, stream_context_create([
'http' => [
'method' => 'GET',
'header' =>
"Authorization: " . $app["other"]["token"] . "\r\n"
]
- ]));
+ ])));
} else {
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/fronters.json", file_get_contents("https://pluralkit.equestria.dev/v2/systems/$input[system_id]/fronters"));
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/switches.json", file_get_contents("https://pluralkit.equestria.dev/v2/systems/$input[system_id]/switches"));