Return the user id in case of an error

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/6293/head
Joas Schilling 8 years ago
parent 5adc1efe9f
commit 0aff1c9268
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
  1. 2
      core/Controller/AvatarController.php
  2. 2
      tests/Core/Controller/AvatarControllerTest.php

@ -143,7 +143,7 @@ class AvatarController extends Controller {
} catch (\Exception $e) {
$resp = new JSONResponse([
'data' => [
'displayname' => '',
'displayname' => $userId,
],
]);
}

@ -169,7 +169,7 @@ class AvatarControllerTest extends \Test\TestCase {
//Comment out until JS is fixed
//$this->assertEquals(Http::STATUS_NOT_FOUND, $response->getStatus());
$this->assertEquals(Http::STATUS_OK, $response->getStatus());
$this->assertEquals('', $response->getData()['data']['displayname']);
$this->assertEquals('userDoesNotExist', $response->getData()['data']['displayname']);
}
/**

Loading…
Cancel
Save