feat(core): runDataSourceMethod 返回 await 方法的执行结果

This commit is contained in:
moonszhang 2026-03-18 09:15:01 +00:00 committed by roymondchen
parent 5ae667b7ee
commit 92bd5cf942

View File

@ -293,9 +293,11 @@ class App extends EventEmitter {
const method = methods.find((item) => item.name === methodName); const method = methods.find((item) => item.name === methodName);
if (method && typeof method.content === 'function') { if (method && typeof method.content === 'function') {
await method.content({ app: this, params, dataSource, eventParams: args, flowState, node }); return await method.content({ app: this, params, dataSource, eventParams: args, flowState, node });
} else if (typeof dataSource[methodName] === 'function') { }
await dataSource[methodName]();
if (typeof dataSource[methodName] === 'function') {
return await dataSource[methodName]();
} }
} catch (e: any) { } catch (e: any) {
if (this.errorHandler) { if (this.errorHandler) {