Skip to content

Commit

Permalink
Merge pull request #3 from not-empty/fixing-response
Browse files Browse the repository at this point in the history
fixing response
  • Loading branch information
leodisarli committed Nov 9, 2023
2 parents 05795d4 + 3eb5119 commit e3a039f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/ResponseJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public function response(
$profiler = $this->getProfiler($start);

$response = [
'data' => $data,
'response' => $data,
'profiler' => $profiler,
'token' => $token,
'jwt' => $token,
'requestId' => $requestId,
];

Expand All @@ -44,7 +44,7 @@ public function response(
public function responseDelete(): array
{
$response = [
'data' => [],
'response' => [],
];
return $response;
}
Expand Down
10 changes: 5 additions & 5 deletions tests/ResponseJsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public function testResponseError()
);

$response = [
'data' => [],
'response' => [],
'profiler' => $finish,
'token' => $token,
'jwt' => $token,
'requestId' => 'requestid',
'message' => 'An unexpected error occurred, please try again later',
];
Expand Down Expand Up @@ -81,11 +81,11 @@ public function testResponseSucess()
);

$response = [
'data' => [
'response' => [
'id' => 1,
],
'profiler' => $finish,
'token' => $token,
'jwt' => $token,
'requestId' => 'requestid',
];

Expand All @@ -100,7 +100,7 @@ public function testResponseDelete()
$responseJson = new ResponseJson;
$helper = $responseJson->responseDelete();

$this->assertEmpty($helper['data']);
$this->assertEmpty($helper['response']);
}

/**
Expand Down

0 comments on commit e3a039f

Please sign in to comment.