mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-10 21:24:33 +01:00
Remove unused code in Http middleware
This commit is contained in:
parent
748aa3dfc6
commit
b685af611a
@ -35,13 +35,6 @@ use OCA\Contacts\Controller,
|
|||||||
*/
|
*/
|
||||||
class Http extends Middleware {
|
class Http extends Middleware {
|
||||||
|
|
||||||
/**
|
|
||||||
* @param IAppContainer $app an instance of the app container
|
|
||||||
*/
|
|
||||||
public function __construct($app) {
|
|
||||||
//$this->api = $api;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If an Exception is being caught, return a JSON error response with
|
* If an Exception is being caught, return a JSON error response with
|
||||||
* a suitable status code
|
* a suitable status code
|
||||||
@ -59,16 +52,9 @@ class Http extends Middleware {
|
|||||||
} else {
|
} else {
|
||||||
$response->setStatus($exception->getCode());
|
$response->setStatus($exception->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
$response->setErrorMessage($exception->getMessage());
|
$response->setErrorMessage($exception->getMessage());
|
||||||
//$this->api->log(get_class($controller) . '->' . $methodName . ': ' . $exception->getMessage());
|
|
||||||
return $response;
|
|
||||||
}
|
|
||||||
|
|
||||||
function beforeOutput($controller, $methodName, $output) {
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
function beforeController($controller, $methodName) {}
|
|
||||||
function afterController($controller, $methodName, Response $response) {
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user