Cleanup API

This commit is contained in:
Romain Neutron
2014-02-24 23:38:20 +01:00
parent 2df0f9d659
commit 08efd8ff72
43 changed files with 2676 additions and 5127 deletions

View File

@@ -276,12 +276,11 @@ class API_OAuth2_Token
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
if ( ! $row)
if (!$row) {
throw new NotFoundHttpException('Account not found');
}
$account = new API_OAuth2_Account($app, $row['api_account_id']);
return new self($app['phraseanet.appbox'], $account);
return new self($app['phraseanet.appbox'], new API_OAuth2_Account($app, $row['api_account_id']));
}
/**