Skip to content

Commit

Permalink
Ops metadatas should return result object instead of array
Browse files Browse the repository at this point in the history
  • Loading branch information
juvenn committed May 12, 2016
1 parent 09e0498 commit caacf05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/LeanCloud/Engine/LeanEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ protected function dispatch($method, $url) {
$this->processSession();
if (strpos($pathParts["extra"], "/_ops/metadatas") === 0) {
if ($this->env["useMaster"]) {
$this->renderJSON(Cloud::getKeys());
$this->renderJSON(array("result" => Cloud::getKeys()));
} else {
$this->renderError("Unauthorized.", 401, 401);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/engine/LeanEngineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testPingEngine() {

public function testGetFuncitonMetadata() {
$resp = $this->request("/1/functions/_ops/metadatas", "GET");
$this->assertContains("hello", $resp);
$this->assertContains("hello", $resp["result"]);
}

public function testCloudFunctionHello() {
Expand Down

0 comments on commit caacf05

Please sign in to comment.