Skip to content

Commit 92fe07a

Browse files
committed
Add pass params as Json
1 parent 08df731 commit 92fe07a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/TFASoft/TFA.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TFA
2525
* @param string $accessToken
2626
* @param string $baseUrl (optional. you can change api base url using this param)
2727
*/
28-
function __construct(string $accessToken, string $baseUrl = 'https://tele-fa-api.herokuapp.com/')
28+
function __construct(string $accessToken, string $baseUrl = 'https://tfasoft-api.herokuapp.com/api/auth/')
2929
{
3030
$this->accessToken = $accessToken;
3131
$this->client = new HttpClient([
@@ -61,14 +61,14 @@ public function getBaseUrl(): string
6161
*/
6262
public function authUser(string $userToken): array
6363
{
64-
$api = "api/auth/access";
64+
$api = "auth/access";
6565

6666
$body = [
6767
"access_token" => $this->accessToken,
6868
"user_token" => $userToken,
6969
];
7070

71-
$response = $this->client->post($api, [ "body" => $body ]);
71+
$response = $this->client->post($api, [ "json" => $body ]);
7272

7373
$data = [
7474
"status" => $response->getStatusCode(),

0 commit comments

Comments
 (0)