diff --git a/src/Api.php b/src/Api.php index c5115f0..93e9500 100644 --- a/src/Api.php +++ b/src/Api.php @@ -107,7 +107,7 @@ public static function do_refresh() { break; } try { - $result = self::build_request( + self::build_request( 'RefreshObjectCaches', [ 'ObjectPath' => $url, @@ -141,6 +141,9 @@ public static function get_quota() { 'message' => sprintf( __( 'You can refresh %s files and %s directories today.', Config::identifier ), $result['UrlRemain'], $result['DirRemain'] ) ]; + + return $data; + } catch ( ClientException $e ) { return [ 'status' => 500, @@ -152,7 +155,5 @@ public static function get_quota() { 'message' => sprintf( __( 'Fail to get quota, error message: %s', Config::identifier ), $e->getErrorMessage() ) ]; } - - return $data; } } \ No newline at end of file