Return the user id in case of an error
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
5adc1efe9f
commit
0aff1c9268
2 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue