From 5130935ad52c149837fd45e936c943223d13dfc4 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 13 Aug 2021 08:18:13 +0530 Subject: chore: Refactoring to reuse already defined constants --- src/api/utils/auth.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api/utils') diff --git a/src/api/utils/auth.js b/src/api/utils/auth.js index 9f718f171..e493b2962 100644 --- a/src/api/utils/auth.js +++ b/src/api/utils/auth.js @@ -1,5 +1,5 @@ -import { app } from '@electron/remote'; import localStorage from 'mobx-localstorage'; +import { ferdiLocale, ferdiVersion } from '../../environment'; export const prepareAuthRequest = (options = { method: 'GET' }, auth = true) => { const request = Object.assign(options, { @@ -7,10 +7,10 @@ export const prepareAuthRequest = (options = { method: 'GET' }, auth = true) => headers: { 'Content-Type': 'application/json', 'X-Franz-Source': 'desktop', - 'X-Franz-Version': app.getVersion(), + 'X-Franz-Version': ferdiVersion, 'X-Franz-platform': process.platform, 'X-Franz-Timezone-Offset': new Date().getTimezoneOffset(), - 'X-Franz-System-Locale': app.getLocale(), + 'X-Franz-System-Locale': ferdiLocale, ...options.headers, }, }); -- cgit v1.2.3-70-g09d2