1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Remove unused code in Http middleware

This commit is contained in:
Thomas Tanghus 2014-03-10 22:24:19 +01:00
parent 748aa3dfc6
commit b685af611a

View File

@ -35,13 +35,6 @@ use OCA\Contacts\Controller,
*/
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
* a suitable status code
@ -59,16 +52,9 @@ class Http extends Middleware {
} else {
$response->setStatus($exception->getCode());
}
$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) {
$response->setErrorMessage($exception->getMessage());
return $response;
}