From 9e9b15d90d2f5bc771d34eef8dce761899040919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Wado=C5=84?= Date: Wed, 28 Feb 2018 16:32:48 +0100 Subject: [PATCH 1/2] Return API response instead of 'true' --- src/Repositories/Repository.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Repositories/Repository.php b/src/Repositories/Repository.php index 257a087..bb0e9ca 100644 --- a/src/Repositories/Repository.php +++ b/src/Repositories/Repository.php @@ -97,24 +97,22 @@ protected function getApiVersion() * Create a new model. * * @param \Maclof\Kubernetes\Models\Model $model - * @return boolean + * @return array */ public function create(Model $model) { - $this->sendRequest('POST', '/' . $this->uri, null, $model->getSchema(), $this->namespace); - return true; + return $this->sendRequest('POST', '/' . $this->uri, null, $model->getSchema(), $this->namespace); } /** * Update a model. * * @param \Maclof\Kubernetes\Models\Model $model - * @return boolean + * @return array */ public function update(Model $model) { - $this->sendRequest('PUT', '/' . $this->uri . '/' . $model->getMetadata('name'), null, $model->getSchema(), $this->namespace); - return true; + return $this->sendRequest('PUT', '/' . $this->uri . '/' . $model->getMetadata('name'), null, $model->getSchema(), $this->namespace); } /** From 4332a20cb86a4d891b0dd9dcde3415e232da8010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Wadon=CC=81?= Date: Wed, 28 Feb 2018 17:12:16 +0100 Subject: [PATCH 2/2] Return API response instead of 'true' --- src/Repositories/Repository.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Repositories/Repository.php b/src/Repositories/Repository.php index bb0e9ca..c7c7066 100644 --- a/src/Repositories/Repository.php +++ b/src/Repositories/Repository.php @@ -120,7 +120,7 @@ public function update(Model $model) * * @param \Maclof\Kubernetes\Models\Model $model * @param \Maclof\Kubernetes\Models\DeleteOptions $options - * @return boolean + * @return array */ public function delete(Model $model, DeleteOptions $options = null) { @@ -132,13 +132,13 @@ public function delete(Model $model, DeleteOptions $options = null) * * @param string $name * @param \Maclof\Kubernetes\Models\DeleteOptions $options - * @return boolean + * @return array */ public function deleteByName($name, DeleteOptions $options = null) { $body = $options ? $options->getSchema() : null; - $this->sendRequest('DELETE', '/' . $this->uri . '/' . $name, null, $body, $this->namespace); - return true; + + return $this->sendRequest('DELETE', '/' . $this->uri . '/' . $name, null, $body, $this->namespace); } /**