Return the user id in case of an error

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-08-29 11:06:37 +02:00
parent 5adc1efe9f
commit 0aff1c9268
No known key found for this signature in database
GPG key ID: E166FD8976B3BAC8
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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']);
}
/**