mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-25 04:27:22 +08:00
fix cleanup do not run under secret login
This commit is contained in:
@@ -78,15 +78,10 @@ class Handler extends ExceptionHandler
|
||||
{
|
||||
$data = $request->all();
|
||||
$httpStatusCode = $this->getHttpStatusCode($e);
|
||||
if ($httpStatusCode == 200) {
|
||||
$msg = $e->getMessage() ?: get_class($e);
|
||||
} else {
|
||||
$msg = 'Server Error';
|
||||
}
|
||||
$msg = $e->getMessage();
|
||||
$trace = $e->getTraceAsString();
|
||||
if (config('app.debug')) {
|
||||
$data['trace'] = $e->getTraceAsString();
|
||||
$data['trace'] = $trace;
|
||||
}
|
||||
return new JsonResponse(
|
||||
fail($msg, $data),
|
||||
|
||||
@@ -128,7 +128,7 @@ class PollController extends Controller
|
||||
->selectRaw("selection, count(*) as count")->groupBy("selection")
|
||||
->get()->pluck('count', 'selection')->toArray();
|
||||
foreach ($answerStats as $index => &$value) {
|
||||
$value = number_format(($value / $poll->answers_count) * 100, 2) . '%';
|
||||
$value = number_format(($value / $poll->answers_count) * 100, 1) . '%';
|
||||
}
|
||||
$resource = new PollResource($poll);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user