mirror of
https://github.com/openvk/openvk
synced 2025-06-07 06:57:00 +03:00
fix(api): handle Apps API for OAuth compatibility (#1313)
This commit is contained in:
parent
4b7d2b9b17
commit
246dd4ab91
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,8 @@ final class InternalAPIPresenter extends OpenVKPresenter
|
|||
private function fail(int $code, string $message): void
|
||||
{
|
||||
header("HTTP/1.1 400 Bad Request");
|
||||
header("Content-Type: application/x-msgpack");
|
||||
|
||||
exit(MessagePack::pack([
|
||||
"brpc" => 1,
|
||||
"error" => [
|
||||
|
@ -25,6 +27,7 @@ final class InternalAPIPresenter extends OpenVKPresenter
|
|||
|
||||
private function succ($payload): void
|
||||
{
|
||||
header("Content-Type: application/x-msgpack");
|
||||
exit(MessagePack::pack([
|
||||
"brpc" => 1,
|
||||
"result" => $payload,
|
||||
|
|
Loading…
Reference in a new issue