diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2014-08-18 23:54:32 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2014-08-18 23:54:32 +0200 |
| commit | db2f09d46ce2f3a46be1b6f6e031492966242025 (patch) | |
| tree | 4e22eba650c022936a4071afd9b2b0ee417ad34b /lib/response/errorresponse.php | |
| parent | 3780cf15a59c48b3d71e8ec27e3bdacd8a119460 (diff) | |
| download | grauphel-db2f09d46ce2f3a46be1b6f6e031492966242025.tar.gz grauphel-db2f09d46ce2f3a46be1b6f6e031492966242025.zip | |
oauth dance works
Diffstat (limited to 'lib/response/errorresponse.php')
| -rw-r--r-- | lib/response/errorresponse.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/response/errorresponse.php b/lib/response/errorresponse.php new file mode 100644 index 0000000..b72224f --- /dev/null +++ b/lib/response/errorresponse.php @@ -0,0 +1,20 @@ +<?php +namespace OCA\Grauphel\Lib\Response; + +class ErrorResponse extends \OCP\AppFramework\Http\Response +{ + protected $error; + + public function __construct($error) + { + $this->setStatus(\OCP\AppFramework\Http::STATUS_BAD_REQUEST); + $this->addHeader('Content-Type', 'text/plain; charset=utf-8'); + $this->error = $error; + } + + public function render() + { + return $this->error . "\n"; + } +} +?> |
