Added drawing endpoint tests

Also refactored ImageTests away from BrowserKit
Also added image upload type validation.
This commit is contained in:
Dan Brown
2018-01-28 13:18:28 +00:00
parent 9bbef3a3dd
commit 88d09a2a3b
7 changed files with 119 additions and 28 deletions

View File

@ -120,7 +120,10 @@ class ImageController extends Controller
$this->validate($request, [
'file' => 'is_image'
]);
// TODO - Restrict & validate types
if (!$this->imageRepo->isValidType($type)) {
return $this->jsonError(trans('errors.image_upload_type_error'));
}
$imageUpload = $request->file('file');