mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-10 06:55:45 +08:00
调整使用公共返回方法
This commit is contained in:
parent
473910fc6b
commit
61ff24e723
@ -39,10 +39,7 @@ class Handler extends ExceptionHandler
|
|||||||
//
|
//
|
||||||
});
|
});
|
||||||
$this->renderable(function (ValidationException $e) {
|
$this->renderable(function (ValidationException $e) {
|
||||||
return response()->json([
|
return send_error($e->errors()[0] ?? $e->getMessage(), ErrorCode('ARGS'));
|
||||||
'code' => ErrorCode('ARGS'),
|
|
||||||
'error' => $e->errors()[0] ?? $e->getMessage()
|
|
||||||
], $e->status);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user