mirror of
https://github.com/easychen/pushdeer.git
synced 2025-01-09 14:35:32 +08:00
调整使用公共返回方法
This commit is contained in:
parent
473910fc6b
commit
61ff24e723
@ -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'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user