Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Endpoint/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function delete(int $id): bool
$response = $this->guzzle->delete($this->endpoint . '/' . $id);
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoint/ApplicationMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public function deleteAll(int $id): bool
$response = $this->guzzle->delete($this->endpoint . '/' . $id . '/message');
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}
}
2 changes: 1 addition & 1 deletion src/Endpoint/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ public function delete(int $id): bool
$response = $this->guzzle->delete($this->endpoint . '/' . $id);
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}
}
4 changes: 2 additions & 2 deletions src/Endpoint/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function delete(int $id): bool
$response = $this->guzzle->delete($this->endpoint . '/' . $id);
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}

/**
Expand All @@ -128,6 +128,6 @@ public function deleteAll(): bool
$response = $this->guzzle->delete($this->endpoint);
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}
}
6 changes: 3 additions & 3 deletions src/Endpoint/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function updateConfig(int $id, string $config): bool
$response = $this->guzzle->postYaml($this->endpoint . '/' . $id . '/config', $config);
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}

/**
Expand Down Expand Up @@ -96,7 +96,7 @@ public function enable(int $id): bool
$response = $this->guzzle->post($this->endpoint . '/' . $id . '/enable');
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}

/**
Expand All @@ -113,6 +113,6 @@ public function disable(int $id): bool
$response = $this->guzzle->post($this->endpoint . '/' . $id . '/disable');
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}
}
4 changes: 2 additions & 2 deletions src/Endpoint/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function updatePassword(string $password): bool
$response = $this->guzzle->post('current/user/password', $data);
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}

/**
Expand Down Expand Up @@ -150,6 +150,6 @@ public function delete(int $id): bool
$response = $this->guzzle->delete($this->endpoint . '/' . $id);
$body = $response->getBody()->getContents();

return $body === '' ? true : false;
return $response->getStatusCode() === 200 ? true : false;
}
}