mirror of
https://github.com/openvk/openvk
synced 2024-12-23 00:51:03 +03:00
Add 405 errors for svcapi (#691)
This commit is contained in:
parent
e87cb2deac
commit
643208dff0
1 changed files with 6 additions and 4 deletions
|
@ -29,9 +29,10 @@ final class InternalAPIPresenter extends OpenVKPresenter
|
||||||
|
|
||||||
function renderRoute(): void
|
function renderRoute(): void
|
||||||
{
|
{
|
||||||
if($_SERVER["REQUEST_METHOD"] !== "POST")
|
if($_SERVER["REQUEST_METHOD"] !== "POST") {
|
||||||
|
header("HTTP/1.1 405 Method Not Allowed");
|
||||||
exit("ты дебил это точка апи");
|
exit("ты дебил это точка апи");
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$input = (object) MessagePack::unpack(file_get_contents("php://input"));
|
$input = (object) MessagePack::unpack(file_get_contents("php://input"));
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
|
@ -71,9 +72,10 @@ final class InternalAPIPresenter extends OpenVKPresenter
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderTimezone() {
|
function renderTimezone() {
|
||||||
if($_SERVER["REQUEST_METHOD"] !== "POST")
|
if($_SERVER["REQUEST_METHOD"] !== "POST") {
|
||||||
|
header("HTTP/1.1 405 Method Not Allowed");
|
||||||
exit("ты дебил это метод апи");
|
exit("ты дебил это метод апи");
|
||||||
|
}
|
||||||
$sessionOffset = Session::i()->get("_timezoneOffset");
|
$sessionOffset = Session::i()->get("_timezoneOffset");
|
||||||
if(is_numeric($this->postParam("timezone", false))) {
|
if(is_numeric($this->postParam("timezone", false))) {
|
||||||
$postTZ = intval($this->postParam("timezone", false));
|
$postTZ = intval($this->postParam("timezone", false));
|
||||||
|
|
Loading…
Reference in a new issue