Merge pull request #5562 from fanatic75/fix-4846-added-expiry-value-to-account-sessions
fix expire field in list account sessions api
This commit is contained in:
commit
b2b1b6e2e4
2 changed files with 2 additions and 0 deletions
|
@ -1389,6 +1389,7 @@ App::get('/v1/account/sessions')
|
|||
|
||||
$session->setAttribute('countryName', $countryName);
|
||||
$session->setAttribute('current', ($current == $session->getId()) ? true : false);
|
||||
$session->setAttribute('expire', DateTime::formatTz(DateTime::addSeconds(new \DateTime($session->getCreatedAt()), $authDuration)));
|
||||
|
||||
$sessions[$key] = $session;
|
||||
}
|
||||
|
|
|
@ -308,6 +308,7 @@ trait AccountBase
|
|||
|
||||
$this->assertEquals(true, $response['body']['sessions'][0]['current']);
|
||||
|
||||
$this->assertNotFalse(\DateTime::createFromFormat('Y-m-d\TH:i:s.uP', $response['body']['sessions'][0]['expire']));
|
||||
/**
|
||||
* Test for FAILURE
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue