From e91730cdecd8a0f8ab92ef76d6bda44f64293ed8 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 18 Jan 2022 13:20:35 +0100 Subject: [PATCH] fix(sms): static response for backTest --- modules/client/back/methods/sms/send.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/client/back/methods/sms/send.js b/modules/client/back/methods/sms/send.js index 4e088d6ee..08daf83a1 100644 --- a/modules/client/back/methods/sms/send.js +++ b/modules/client/back/methods/sms/send.js @@ -52,12 +52,13 @@ module.exports = Self => { let response; try { if (process.env.NODE_ENV !== 'production') - params.fake = 1; - - const jsonTest = { - json: params - }; - response = await got.post(smsConfig.uri, jsonTest).json(); + response = {result: [{status: 'ok'}]}; + else { + const jsonTest = { + json: params + }; + response = await got.post(smsConfig.uri, jsonTest).json(); + } } catch (e) { console.error(e); }