From e37ea635a8b2ca0e0277bd3048b72845ef58e15a Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Wed, 9 Oct 2019 16:09:42 +0200 Subject: [PATCH] [FIX] Typo in autotranslate method (#15344) --- app/api/server/v1/autotranslate.js | 2 +- tests/end-to-end/api/00-autotranslate.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api/server/v1/autotranslate.js b/app/api/server/v1/autotranslate.js index fb3f4f81fa9f..da611dd89847 100644 --- a/app/api/server/v1/autotranslate.js +++ b/app/api/server/v1/autotranslate.js @@ -35,7 +35,7 @@ API.v1.addRoute('autotranslate.saveSettings', { authRequired: true }, { return API.v1.failure('The bodyParam "autoTranslate" must be a boolean.'); } if (field === 'autoTranslateLanguage' && typeof value !== 'string') { - return API.v1.failure('The bodyParam "autoTranslate" must be a string.'); + return API.v1.failure('The bodyParam "autoTranslateLanguage" must be a string.'); } Meteor.runAsUser(this.userId, () => Meteor.call('autoTranslate.saveSettings', roomId, field, value === true ? '1' : String(value).valueOf(), { defaultLanguage })); diff --git a/tests/end-to-end/api/00-autotranslate.js b/tests/end-to-end/api/00-autotranslate.js index ea3427fa5a75..452430ae2523 100644 --- a/tests/end-to-end/api/00-autotranslate.js +++ b/tests/end-to-end/api/00-autotranslate.js @@ -160,7 +160,7 @@ describe('AutoTranslate', function() { .expect(400) .expect((res) => { expect(res.body).to.have.a.property('success', false); - expect(res.body.error).to.be.equal('The bodyParam "autoTranslate" must be a string.'); + expect(res.body.error).to.be.equal('The bodyParam "autoTranslateLanguage" must be a string.'); }) .end(done); });