mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
d762691881
@ -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