Keep Id and better error
This commit is contained in:
parent
0afa1297e9
commit
2072ba5744
1 changed files with 3 additions and 3 deletions
|
@ -160,7 +160,7 @@ class ScoreControllerProvider implements ControllerProviderInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($request->files->all() as $file) {
|
foreach($request->files->all() as $id => $file) {
|
||||||
/* @var $file \Symfony\Component\HttpFoundation\File\UploadedFile */
|
/* @var $file \Symfony\Component\HttpFoundation\File\UploadedFile */
|
||||||
$filename = $file->getClientOriginalName();
|
$filename = $file->getClientOriginalName();
|
||||||
$ext = $file->getClientOriginalExtension();
|
$ext = $file->getClientOriginalExtension();
|
||||||
|
@ -175,7 +175,7 @@ class ScoreControllerProvider implements ControllerProviderInterface
|
||||||
list($hit_id, $part) = \explode('-', $id_string);
|
list($hit_id, $part) = \explode('-', $id_string);
|
||||||
|
|
||||||
if(!in_array($part, $valid_parts)) {
|
if(!in_array($part, $valid_parts)) {
|
||||||
return new JsonResponse(['success' => false, 'message' => "unknown face part."], 400);
|
return new JsonResponse(['success' => false, 'message' => "unknown face part '$part'"], 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @var $hit Models\Hit */
|
/* @var $hit Models\Hit */
|
||||||
|
|
Loading…
Reference in a new issue