diff --git a/lib/Controller/LocalController.php b/lib/Controller/LocalController.php index d8a48d2c..291d6faa 100644 --- a/lib/Controller/LocalController.php +++ b/lib/Controller/LocalController.php @@ -112,9 +112,13 @@ class LocalController extends Controller { * @NoAdminRequired */ public function uploadAttachement(): DataResponse { + try { + throw new \BadMethodCallException('uploadAttachment is not implemented yet'); + } catch (Exception $e) { + return $this->fail($e); + } } - /** * Create a new post. * diff --git a/lib/Controller/MediaApiController.php b/lib/Controller/MediaApiController.php index 82cd0532..717d3597 100644 --- a/lib/Controller/MediaApiController.php +++ b/lib/Controller/MediaApiController.php @@ -8,6 +8,7 @@ declare(strict_types=1); namespace OCA\Social\Controller; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\DataResponse; use OCP\Files\IMimeTypeDetector; class MediaApiController extends Controller { @@ -32,7 +33,7 @@ class MediaApiController extends Controller { */ public function uploadMedia(): DataResponse { // TODO - return DataResponse([ + return new DataResponse([ 'id' => 1, 'url' => '', 'preview_url' => '',