Skip to content

Commit

Permalink
Merge pull request #16 from thedevdojo/dynamicDirectoryFolder
Browse files Browse the repository at this point in the history
Adding latest content
  • Loading branch information
tnylea authored May 4, 2023
2 parents 9a69096 + 1e08774 commit e6534b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tails.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static function getResponse($project){
}
$response = Http::withToken( $apiKey )->get($endpoint);
if(!$response->ok()){
$this->handleErrorResponse($response);
self::handleErrorResponse($response);
}
$jsonResponse = (object)$response->json();
if(isset($jsonResponse->header)){
Expand All @@ -45,15 +45,15 @@ public static function getCacheArray(){

$response = Http::withToken( $apiKey )->get($endpoint);
if(!$response->ok()){
$this->handleErrorResponse($response);
self::handleErrorResponse($response);
}

$jsonResponse = (object)$response->json();

return $jsonResponse;
}

private function handleErrorResponse($response){
public static function handleErrorResponse($response){
$errorType = '';
if($response->clientError()){
$errorType = 'Client Error';
Expand Down

0 comments on commit e6534b9

Please sign in to comment.