diff --git a/client/src/App.js b/client/src/App.js index 73dadf54f..4c96c8b77 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -74,11 +74,11 @@ export const MasterApp = props => ( render={props => } /> } /> } /> diff --git a/client/src/views/layout/header/imports.js b/client/src/views/layout/header/imports.js index 20e16c315..1c605325a 100644 --- a/client/src/views/layout/header/imports.js +++ b/client/src/views/layout/header/imports.js @@ -7,7 +7,6 @@ import { BugReport, People, Group, - // Adb, VpnKey, Home, AddCircleOutline @@ -51,26 +50,26 @@ const eventsMenus = { } const keyvaultMenus = { - title: 'Key Vault', - to: '/key-vault', + title: 'Keys', + to: '/keys', icon: Home, authenticated: true, submenus: [ - { title: 'Your keys', to: '/key-vault/browse', icon: VpnKey }, - { title: 'Add key', to: '/key-vault/addKey', icon: AddCircleOutline }, + { title: 'Your keys', to: '/keys/browse', icon: VpnKey }, + { title: 'Add key', to: '/keys/addKey', icon: AddCircleOutline }, { title: 'Report a Bug', to: 'https://github.com/Superalgos/KeyVaultModule/issues/new', icon: BugReport, externalLink: true } ] } const operationsMenus = { - title: 'Operations', - to: '/operations', + title: 'Clones', + to: '/clones', icon: Home, authenticated: true, submenus: [ - { title: 'Active clones', to: '/operations/browse', icon: ImportContacts }, - { title: 'History', to: '/operations/history', icon: LibraryAdd }, - { title: 'Clone a bot', to: '/operations/add', icon: AddCircleOutline }, + { title: 'Active Clones', to: '/clones/browse', icon: ImportContacts }, + { title: 'History Clones', to: '/clones/history', icon: LibraryAdd }, + { title: 'Create Clone', to: '/clones/add', icon: AddCircleOutline }, { title: 'Report a Bug', to: 'https://github.com/Superalgos/OperationsModule/issues/new', icon: BugReport, externalLink: true } ] } diff --git a/server/src/index.js b/server/src/index.js index 0cea9ce45..5a8cd2e9a 100644 --- a/server/src/index.js +++ b/server/src/index.js @@ -166,8 +166,8 @@ async function run () { schema, context, formatError: error => { - logger.error(`An error ocurred inside a module: ${JSON.stringify(error)}`) - return error + logger.error('An error ocurred inside a module: %s', error.message) + return error.message }, formatResponse: response => { logger.debug('Response from Apollo Server: ' + response) @@ -181,29 +181,6 @@ async function run () { } }) - const whitelist = [ - process.env.PROJECT_SITE_URL, - process.env.PLATFORM_URL, - process.env.GRAPHQL_API_URL, - process.env.TEAMS_API_URL, - process.env.USERS_API_URL, - process.env.EVENTS_API_URL, - process.env.KEYVAULT_API_URL, - process.env.FINANCIAL_BEINGS_API_URL, - process.env.NOTIFICATIONS_API_URL - ] - - const corsOptionsDelegate = (req, callback) => { - let corsOptions - if (whitelist.indexOf(req.header('Origin')) !== -1) { - corsOptions = { origin: true, credentials: true } - } else { - corsOptions = { origin: false, credentials: true } - } - callback(null, corsOptions) - } - - // server.applyMiddleware({ app, cors: corsOptionsDelegate }) server.applyMiddleware({ app, cors: { origin: true, credentials: true, methods:'GET,PUT,POST,DELETE,OPTIONS'}}) app.listen(4100)