mirror of
https://github.com/hexastack/hexabot
synced 2025-03-09 22:01:23 +00:00
fix: update context-var.service getContextVarsByBlock method
This commit is contained in:
parent
7f6b481988
commit
b574295d8c
@ -36,7 +36,7 @@ export class ContextVarService extends BaseService<
|
|||||||
block: Block | BlockFull,
|
block: Block | BlockFull,
|
||||||
): Promise<Record<string, ContextVar>> {
|
): Promise<Record<string, ContextVar>> {
|
||||||
const vars = await this.find({
|
const vars = await this.find({
|
||||||
name: { $in: block.capture_vars?.map(({ context_var }) => context_var) },
|
name: { $in: block.capture_vars.map(({ context_var }) => context_var) },
|
||||||
});
|
});
|
||||||
return vars.reduce((acc, cv) => {
|
return vars.reduce((acc, cv) => {
|
||||||
acc[cv.name] = cv;
|
acc[cv.name] = cv;
|
||||||
|
Loading…
Reference in New Issue
Block a user