Updates websocket analysis warnings

This commit is contained in:
thomashii@dukefirehawk.com 2022-08-18 21:33:58 +08:00
parent 0043114180
commit 1540394586

View file

@ -234,28 +234,27 @@ class AngelWebSocket {
try {
if (actionName == indexAction) {
socket.send(
'${split[0]}::' + indexedEvent, await service.index(params));
socket.send('${split[0]}::$indexedEvent', await service.index(params));
return null;
} else if (actionName == readAction) {
socket.send(
'${split[0]}::' + readEvent, await service.read(action.id, params));
'${split[0]}::$readEvent', await service.read(action.id, params));
return null;
} else if (actionName == createAction) {
return WebSocketEvent(
eventName: '${split[0]}::' + createdEvent,
eventName: '${split[0]}::$createdEvent',
data: await service.create(action.data, params));
} else if (actionName == modifyAction) {
return WebSocketEvent(
eventName: '${split[0]}::' + modifiedEvent,
eventName: '${split[0]}::$modifiedEvent',
data: await service.modify(action.id, action.data, params));
} else if (actionName == updateAction) {
return WebSocketEvent(
eventName: '${split[0]}::' + updatedEvent,
eventName: '${split[0]}::$updatedEvent',
data: await service.update(action.id, action.data, params));
} else if (actionName == removeAction) {
return WebSocketEvent(
eventName: '${split[0]}::' + removedEvent,
eventName: '${split[0]}::$removedEvent',
data: await service.remove(action.id, params));
} else {
socket.sendError(AngelHttpException.methodNotAllowed(