@myassis/gateway 1.0.66 → 1.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routes/service.js +5 -0
- package/package.json +1 -1
package/dist/routes/service.js
CHANGED
|
@@ -152,6 +152,11 @@ router.post('/update', async (_req, res) => {
|
|
|
152
152
|
// 尝试自动更新(有 nssm 时会成功)
|
|
153
153
|
const result = await (0, ServiceManager_js_1.updateService)();
|
|
154
154
|
if (result.success) {
|
|
155
|
+
// 广播重启通知给所有已连接的客户端,让 Desktop 做好重连准备
|
|
156
|
+
WebSocketService_js_1.webSocketService.broadcast({
|
|
157
|
+
type: 'gateway_restarting',
|
|
158
|
+
payload: { message: 'Gateway 正在更新,即将重启...' },
|
|
159
|
+
});
|
|
155
160
|
res.json(result);
|
|
156
161
|
return;
|
|
157
162
|
}
|