1
0
Fork 0
mirror of synced 2024-09-30 01:08:13 +13:00

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:
Eldad A. Fux 2023-07-19 00:17:53 +03:00 committed by GitHub
commit b2b1b6e2e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -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;
}

View file

@ -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
*/