From aa3adef0dad08067597ff44be43696a99ed3d40f Mon Sep 17 00:00:00 2001 From: Chika Date: Wed, 2 Nov 2022 14:24:09 +0300 Subject: [PATCH] trpc: fix http 431 --- process/load-kp/reactions.ts | 2 +- trpc/routers/quote.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/process/load-kp/reactions.ts b/process/load-kp/reactions.ts index d0d2c6a..a4a2aac 100644 --- a/process/load-kp/reactions.ts +++ b/process/load-kp/reactions.ts @@ -23,7 +23,7 @@ export default function loadKpReactions( const quoteName = $calculation.element('selectQuote').getOption()?.label; trpcClient.quote.getValues - .query({ + .mutate({ values: toJS($calculation.$values.values), }) .then(({ values }) => { diff --git a/trpc/routers/quote.ts b/trpc/routers/quote.ts index 51811f9..7ce90fe 100644 --- a/trpc/routers/quote.ts +++ b/trpc/routers/quote.ts @@ -16,7 +16,7 @@ const quoteRouter = t.router({ values: ValuesSchema, }) ) - .query(async ({ input }) => { + .mutation(async ({ input }) => { const { values } = await getSupplierAgentsDataFromKP(input.values); const { lead, opportunity, quote, leadUrl, opportunityUrl, quoteUrl } = input.values;