Merge branch 'develop' of github.com:hillelcoren/invoice-ninja into develop

This commit is contained in:
Hillel Coren 2016-08-04 20:02:55 +03:00
commit 0746500c1a

View File

@ -52,7 +52,10 @@ class DocumentAPIController extends BaseAPIController
{
$document = $request->entity();
return DocumentController::getDownloadResponse($document);
if(array_key_exists($document->type, Document::$types))
return DocumentController::getDownloadResponse($document);
else
return $this->errorResponse(['error'=>'Invalid mime type'],400);
}
/**