From b9d7a5ba385dbcb3a3ddaae10e438b6a6361d247 Mon Sep 17 00:00:00 2001 From: Tainan Felipe Date: Wed, 10 Jan 2018 10:43:45 -0200 Subject: [PATCH] changes to import form --- bigbluebutton-html5/imports/startup/server/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bigbluebutton-html5/imports/startup/server/index.js b/bigbluebutton-html5/imports/startup/server/index.js index 770a5c8448..39ce488636 100644 --- a/bigbluebutton-html5/imports/startup/server/index.js +++ b/bigbluebutton-html5/imports/startup/server/index.js @@ -1,5 +1,7 @@ import { Meteor } from 'meteor/meteor'; import Langmap from 'langmap'; +import fs from 'fs'; +import path from 'path'; import Logger from './logger'; import Redis from './redis'; @@ -29,7 +31,6 @@ WebApp.connectHandlers.use('/locale', (req, res) => { normalizedLocale = `${localeRegion[0]}_${localeRegion[1].toUpperCase()}`; localeList.push(normalizedLocale); } - localeList.forEach((locale) => { try { const data = Assets.getText(`locales/${locale}.json`); @@ -45,15 +46,10 @@ WebApp.connectHandlers.use('/locale', (req, res) => { }); WebApp.connectHandlers.use('/locales', (req, res) => { - const fs = Npm.require('fs'); - const path = Npm.require('path'); const basePath = path.resolve('.').split('.meteor')[0]; - let availableLocales = []; - try { const getAvailableLocales = fs.readdirSync(basePath.concat('private/locales')); - availableLocales = getAvailableLocales .map(file => file.replace('.json', '')) .map(file => file.replace('_', '-'))