调整使用公共返回方法

This commit is contained in:
古俊杰 2021-12-27 22:10:12 +08:00
parent 473910fc6b
commit 61ff24e723

View File

@ -39,10 +39,7 @@ class Handler extends ExceptionHandler
//
});
$this->renderable(function (ValidationException $e) {
return response()->json([
'code' => ErrorCode('ARGS'),
'error' => $e->errors()[0] ?? $e->getMessage()
], $e->status);
return send_error($e->errors()[0] ?? $e->getMessage(), ErrorCode('ARGS'));
});
}
}