From b5f589c323f415bb42ea7069cb4d1a8a2233dd69 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 31 Aug 2022 22:03:07 +0200 Subject: Update I guess - Stuffie --- api/app-images.php | 2 +- api/cloudburst-banners.php | 2 +- api/cloudburst-data.php | 2 +- api/cloudburst-scored.php | 9 +++++++++ api/data.php | 2 +- api/emergency-real.php | 2 +- api/emergency.php | 2 +- api/eval.php | 12 ++++++++++++ api/fronter.php | 2 +- api/me-picture.php | 2 +- api/me.php | 2 +- api/pleasure-real.php | 2 +- api/pleasure.php | 2 +- api/pluralkit-integration.php | 27 +++++++++++++++++++++++++-- api/raindrops-banners.php | 2 +- api/raindrops-data.php | 2 +- api/raindrops-scored.php | 9 +++++++++ api/save.php | 2 +- api/token.php | 2 +- api/video.php | 2 +- 20 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 api/cloudburst-scored.php create mode 100644 api/eval.php create mode 100644 api/raindrops-scored.php (limited to 'api') diff --git a/api/app-images.php b/api/app-images.php index edab3c9..76b11a0 100644 --- a/api/app-images.php +++ b/api/app-images.php @@ -1,7 +1,7 @@ [ + 'method' => 'POST', + 'header' => + "Content-Type: text/plain\r\n" . + "Title: 🐴 Switch occurred in the $name\r\n" . + "Priority: default\r\n" . + "Tags: switch\r\n" . + "Actions: view, Open on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true\r\n" . + "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), + 'content' => ($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " switched in just now" + ] + ])); + file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data.json-res", "affected: " . $input["type"] . " (" . gettype($input["type"]) . ")") and die(); } else { file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/data.json-res", "invalid method: " . $input["type"] . " (" . gettype($input["type"]) . ")") and die(); diff --git a/api/raindrops-banners.php b/api/raindrops-banners.php index 715d7c4..f42426a 100644 --- a/api/raindrops-banners.php +++ b/api/raindrops-banners.php @@ -3,7 +3,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/bitset.php"; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/banner.php"; -if (!$isLoggedIn) header("Location: /login") and die(); +if (!$isLoggedIn) header("Location: /-/login") and die(); $data = []; diff --git a/api/raindrops-data.php b/api/raindrops-data.php index 6af9233..958fb8f 100644 --- a/api/raindrops-data.php +++ b/api/raindrops-data.php @@ -2,7 +2,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $isLoggedIn; require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/bitset.php"; -if (!$isLoggedIn) header("Location: /login") and die(); +if (!$isLoggedIn) header("Location: /-/login") and die(); $data = []; $data["members"] = []; diff --git a/api/raindrops-scored.php b/api/raindrops-scored.php new file mode 100644 index 0000000..929cdc8 --- /dev/null +++ b/api/raindrops-scored.php @@ -0,0 +1,9 @@ +