Compare commits

...

2 Commits

Author SHA1 Message Date
a620906209 b770aab42a Merge pull request 'refactor: 精簡 /health 回應欄位' (#15) from feature/health-endpoint into master
Deploy Production / deploy (push) Successful in 16s
Reviewed-on: #15
2026-05-28 18:05:29 +00:00
a620906209 8d41f473e4 refactor: 精簡 /health 回應欄位
移除 php_version、laravel、environment、memory_mb,
保留 status、timestamp、checks 三欄。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 02:04:24 +08:00
+3 -7
View File
@@ -25,13 +25,9 @@ Route::get('/health', function () {
$healthy = $checks['db'] && $checks['redis'] && $checks['cache'];
return response()->json([
'status' => $healthy ? 'ok' : 'degraded',
'timestamp' => now()->toIso8601String(),
'environment' => app()->environment(),
'php_version' => PHP_VERSION,
'laravel' => app()->version(),
'memory_mb' => round(memory_get_usage(true) / 1024 / 1024, 2),
'checks' => $checks,
'status' => $healthy ? 'ok' : 'degraded',
'timestamp' => now()->toIso8601String(),
'checks' => $checks,
], $healthy ? 200 : 503);
});