summaryrefslogtreecommitdiff
path: root/pages/api/pluralkit-integration.php
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-03-15 22:40:55 +0100
committerRaindropsSys <contact@minteck.org>2023-03-15 22:40:55 +0100
commit940defd2939f52480ed5b548189b549457944995 (patch)
tree7ca52eca3c3fcafe507dc24b4e2812ab785acc29 /pages/api/pluralkit-integration.php
parenteb89b15c0f044673c1206a418a21d0baba1a675e (diff)
downloadpluralconnect-940defd2939f52480ed5b548189b549457944995.tar.gz
pluralconnect-940defd2939f52480ed5b548189b549457944995.tar.bz2
pluralconnect-940defd2939f52480ed5b548189b549457944995.zip
Updated 14 files (automated)
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"));