diff options
author | Minteck <contact@minteck.org> | 2022-10-10 20:51:39 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-10 20:51:39 +0200 |
commit | 108525534c28013cfe1897c30e4565f9893f3766 (patch) | |
tree | dd3e5132971f96ab5f05e7f3f8f6dbbf379a19bd /api/pluralkit-integration.php | |
parent | 2162eaa06f7e4764eb3dcfe130ec2c711d0c62ab (diff) | |
download | pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.gz pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.bz2 pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.zip |
Update
Diffstat (limited to 'api/pluralkit-integration.php')
-rw-r--r-- | api/pluralkit-integration.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/api/pluralkit-integration.php b/api/pluralkit-integration.php index 3582df1..2736f67 100644 --- a/api/pluralkit-integration.php +++ b/api/pluralkit-integration.php @@ -27,15 +27,15 @@ if ($input['system_id'] === "7d9f543e-f742-40f6-9d07-86c3f2983124") { $name = "Cloudburst System"; } -$lastFronter = json_decode(@file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system-last.json"), true) ?? ""; +$lastFronter = json_decode(@file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/last.json"), true) ?? ""; if ($input["type"] === "CREATE_SWITCH" || $input["type"] === "UPDATE_SWITCH" || $input["type"] === "DELETE_SWITCH") { - 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")); + 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")); - $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system-fronters.json"), true); + $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/fronters.json"), true); $currentFronter = $fronters["members"][0]["id"]; - file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system-last.json", json_encode($currentFronter)); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$system/last.json", json_encode($currentFronter)); $ntfy = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true)["ntfy"]; |