mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-12 21:35:20 +01:00
Add @yaakapp/api everywhere
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { YaakContext } from '@yaakapp/api';
|
||||
import jp from 'jsonpath';
|
||||
|
||||
export function pluginHookResponseFilter(_ctx: any, args: { filter: string; body: string }) {
|
||||
export function pluginHookResponseFilter(_ctx: YaakContext, args: { filter: string; body: string }) {
|
||||
const parsed = JSON.parse(args.body);
|
||||
const filtered = jp.query(parsed, args.filter);
|
||||
return JSON.stringify(filtered, null, 2);
|
||||
|
||||
Reference in New Issue
Block a user