mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-19 07:53:54 +01:00
@@ -39,7 +39,6 @@ export const plugin: Plugin = {
|
||||
if (httpRequest == null) {
|
||||
return null;
|
||||
}
|
||||
const renderedHttpRequest = await ctx.httpRequest.render({ httpRequest, purpose: args.purpose });
|
||||
|
||||
const responses = await ctx.httpResponse.find({ requestId: httpRequest.id, limit: 1 });
|
||||
|
||||
@@ -57,6 +56,8 @@ export const plugin: Plugin = {
|
||||
|
||||
// Send if no responses and "smart," or "always"
|
||||
if ((behavior === 'smart' && response == null) || behavior === 'always') {
|
||||
// NOTE: Render inside this conditional, or we'll get infinite recursion (render->render->...)
|
||||
const renderedHttpRequest = await ctx.httpRequest.render({ httpRequest, purpose: args.purpose });
|
||||
response = await ctx.httpRequest.send({ httpRequest: renderedHttpRequest });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user