Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Switch get walls over to new walls code

  • Loading branch information...
commit d411994108891245fe4d7d8470c60625c2ec8f8a 1 parent 54230cb
@birtles birtles authored
Showing with 11 additions and 1 deletion.
  1. +5 −1 wall/public/api/doWalls.php
  2. +6 −0 wall/tests/api/TestGetWall.php
View
6 wall/public/api/doWalls.php
@@ -46,7 +46,11 @@
// XXX Return the list of walls here
bailWithError('bad-request');
}
- $result = getWallDetails($wallId, $_SESSION['email']);
+ $wall = Walls::getById($wallId, $email);
+ if ($wall === null)
+ bailWithError('not-found');
+
+ $result = $wall->asArray();
break;
default:
View
6 wall/tests/api/TestGetWall.php
@@ -74,6 +74,12 @@ function testGetWall() {
$this->removeWall($wallId);
}
+ function testNotFound() {
+ $this->login();
+ $wall = $this->getWall(5000);
+ $this->assertEqual(@$wall['error_key'], 'not-found');
+ }
+
// XXX Check we can't get the information of someone else's wall
function looksLikeAUrl($url) {
Please sign in to comment.
Something went wrong with that request. Please try again.