修复 QLAPI 系统通知响应

This commit is contained in:
whyour
2025-01-12 17:02:21 +08:00
parent ad6e08525c
commit 6775f5d123
3 changed files with 10 additions and 58 deletions
+3 -4
View File
@@ -15,7 +15,6 @@ import {
MoveEnvRequest,
Response,
SystemNotifyRequest,
SystemNotifyResponse,
UpdateEnvNamesRequest,
UpdateEnvRequest,
} from '../protos/api';
@@ -161,13 +160,13 @@ export const getEnvById = async (
};
export const systemNotify = async (
call: ServerUnaryCall<SystemNotifyRequest, SystemNotifyResponse>,
callback: sendUnaryData<SystemNotifyResponse>,
call: ServerUnaryCall<SystemNotifyRequest, Response>,
callback: sendUnaryData<Response>,
) => {
try {
const systemService = Container.get(SystemService);
const data = await systemService.notify(call.request);
callback(null, { code: 200, data });
callback(null, data);
} catch (e: any) {
callback(e);
}