mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Merge branch 'develop' of github.com:hillelcoren/invoice-ninja into develop
This commit is contained in:
commit
0746500c1a
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user