Deduplicate API GET check into single file

This commit is contained in:
Marcus Hill
2022-04-14 20:05:15 +01:00
parent b4f2fdd03d
commit 17f97ff7bc
8 changed files with 15 additions and 49 deletions

View File

@@ -0,0 +1,8 @@
<?php
if($_SERVER['REQUEST_METHOD'] !== "GET"){
header("HTTP/1.1 405 Method Not Allowed");
$return_arr['success'] = "False";
$return_arr['message'] = "Can only send GET requests to this endpoint.";
echo json_encode($return_arr);
exit();
}