Skip to content

Commit

Permalink
refactor: make _applyResponsePluginHooks parameters consistent
Browse files Browse the repository at this point in the history
I've noticed inconsistency on naming between `_applyRequestPluginHooks` and `_applyResponsePluginHooks` parameters.
  • Loading branch information
jgiovaresco committed Sep 25, 2020
1 parent 52bd6df commit 76590b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/insomnia-app/app/network/network.js
Expand Up @@ -997,20 +997,20 @@ async function _applyRequestPluginHooks(

async function _applyResponsePluginHooks(
response: ResponsePatch,
request: RenderedRequest,
renderContext: Object,
renderedRequest: RenderedRequest,
renderedContext: Object,
): Promise<ResponsePatch> {
const newResponse = clone(response);
const newRequest = clone(request);
const newRequest = clone(renderedRequest);

for (const { plugin, hook } of await plugins.getResponseHooks()) {
const context = {
...(pluginContexts.app.init(RENDER_PURPOSE_NO_RENDER): Object),
...(pluginContexts.data.init(): Object),
...(pluginContexts.store.init(plugin): Object),
...(pluginContexts.response.init(newResponse): Object),
...(pluginContexts.request.init(newRequest, renderContext, true): Object),
...(pluginContexts.network.init(renderContext.getEnvironmentId()): Object),
...(pluginContexts.request.init(newRequest, renderedContext, true): Object),
...(pluginContexts.network.init(renderedContext.getEnvironmentId()): Object),
};

try {
Expand Down

0 comments on commit 76590b2

Please sign in to comment.