fix:检查版本升级导致的环境报错
This commit is contained in:
@@ -808,7 +808,8 @@
|
||||
|
||||
async function checkHealth() {
|
||||
try {
|
||||
const res = await fetch('/health', { cache: 'no-store' });
|
||||
// 通过 /api/ws-status 检测后端是否可用(同时避免某些部署环境未透出 /health)
|
||||
const res = await fetch('/api/ws-status', { cache: 'no-store' });
|
||||
if (!res.ok) throw new Error('status ' + res.status);
|
||||
const data = await res.json().catch(() => ({}));
|
||||
$('health-dot').style.background = '#22c55e';
|
||||
|
||||
Reference in New Issue
Block a user