From bec657347aa54634b0845f7954503e96365b1293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20=C5=BBuraw?= <9116238+krzysztofzuraw@users.noreply.github.com> Date: Thu, 3 Oct 2024 16:18:00 +0200 Subject: [PATCH] Remove not needed Bruno pre-request script (#1603) --- apps/avatax/bruno/collection.bru | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 apps/avatax/bruno/collection.bru diff --git a/apps/avatax/bruno/collection.bru b/apps/avatax/bruno/collection.bru deleted file mode 100644 index 7c897c354..000000000 --- a/apps/avatax/bruno/collection.bru +++ /dev/null @@ -1,19 +0,0 @@ -script:pre-request { - // Remove after https://github.com/usebruno/bruno/issues/2960 in done - function resolveTemplateVariables(string) { - const VARIABLE_NAME_REGEX = /{{([A-Za-z_]\w+)}}/g; - - return string.replace( - VARIABLE_NAME_REGEX, - (_, key) => bru.getVar(key) || bru.getEnvVar(key) - ); - } - - const body = req.getBody(); - - if (!body.variables) { - return; - } - - body.variables = resolveTemplateVariables(body.variables); -}