mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
add /developers/ route
This commit is contained in:

committed by
Ysolyne Gresille

parent
07795e873e
commit
6cb75ecec5
@@ -281,8 +281,9 @@ class API_OAuth2_Account
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
if ( ! $row)
|
||||
if ( ! $row) {
|
||||
throw new Exception_NotFound();
|
||||
}
|
||||
|
||||
return new self($appbox, $row['api_account_id']);
|
||||
}
|
||||
|
@@ -145,6 +145,11 @@ class API_OAuth2_Application
|
||||
|
||||
$stmt = $this->appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute(array(':application_id' => $this->id));
|
||||
|
||||
if (0 === $stmt->rowCount()) {
|
||||
throw new \Exception_NotFound(sprintf('Application with id %d not found', $this->id));
|
||||
}
|
||||
|
||||
$row = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
$this->creator = ! $row['creator'] ? null : User_Adapter::getInstance($row['creator'], $this->appbox);
|
||||
|
Reference in New Issue
Block a user