diff --git a/src/api/ADempiere/constants.js b/src/api/ADempiere/constants.js index d399050a..6e627f4d 100644 --- a/src/api/ADempiere/constants.js +++ b/src/api/ADempiere/constants.js @@ -1,14 +1,11 @@ export const ADDRESS_HOST = 'http://localhost' +export const PROXY_PORT = '8989' -export const PORT_DICTIONARY = '8990' -export const HOST_GRPC_DICTIONARY = ADDRESS_HOST + ':' + PORT_DICTIONARY +export const DICTIONARY_ADDRESS = `${ADDRESS_HOST}:${PROXY_PORT}/dictionary` -export const PORT_DATA = '8991' -export const HOST_GRPC_DATA = ADDRESS_HOST + ':' + PORT_DATA +export const BUSINESS_DATA_ADDRESS = `${ADDRESS_HOST}:${PROXY_PORT}/businessdata` -export const PORT_AUTHENTICATION = '8989' -export const HOST_GRPC_AUTHENTICATION = ADDRESS_HOST + ':' + PORT_AUTHENTICATION +export const ACCESS_ADDRESS = `${ADDRESS_HOST}:${PROXY_PORT}/access` -export const PORT_ENROLLMENT = '8992' -export const HOST_GRPC_ENROLLMENT = ADDRESS_HOST + ':' + PORT_ENROLLMENT +export const ENROLLMENT_ADDRESS = `${ADDRESS_HOST}:${PROXY_PORT}/enrollment` diff --git a/src/api/ADempiere/data.js b/src/api/ADempiere/data.js index 363d86ec..25ba5a56 100644 --- a/src/api/ADempiere/data.js +++ b/src/api/ADempiere/data.js @@ -1,12 +1,12 @@ import { getLanguage } from '@/lang/index' import { getToken } from '@/utils/auth' import BusinessData from '@adempiere/grpc-data-client' -import { HOST_GRPC_DATA } from '@/api/ADempiere/constants' +import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants' // Get Instance for connection function Instance() { return new BusinessData( - HOST_GRPC_DATA, + BUSINESS_DATA_ADDRESS, getToken(), getLanguage() || 'en_US' ) diff --git a/src/api/ADempiere/dictionary.js b/src/api/ADempiere/dictionary.js index ec7751a2..843fe16c 100644 --- a/src/api/ADempiere/dictionary.js +++ b/src/api/ADempiere/dictionary.js @@ -1,12 +1,12 @@ import { getLanguage } from '@/lang/index' import { getToken } from '@/utils/auth' import Dictionary from '@adempiere/grpc-dictionary-client' -import { HOST_GRPC_DICTIONARY } from '@/api/ADempiere/constants' +import { DICTIONARY_ADDRESS } from '@/api/ADempiere/constants' // Get Instance for connection function Instance() { return new Dictionary( - HOST_GRPC_DICTIONARY, + DICTIONARY_ADDRESS, getToken(), getLanguage() || 'en_US' ) diff --git a/src/api/ADempiere/enrollment.js b/src/api/ADempiere/enrollment.js index ca17aad5..78247137 100644 --- a/src/api/ADempiere/enrollment.js +++ b/src/api/ADempiere/enrollment.js @@ -1,12 +1,12 @@ import Enrollment from '@adempiere/grpc-enrollment-client' -import { HOST_GRPC_ENROLLMENT } from '@/api/ADempiere/constants' +import { ENROLLMENT_ADDRESS } from '@/api/ADempiere/constants' // Get Instance for connection function Instance() { return new Enrollment( - HOST_GRPC_ENROLLMENT, + ENROLLMENT_ADDRESS, 3.9, - 'ADempier-Vue' + 'ADempiere-Vue' ) } diff --git a/src/api/user.js b/src/api/user.js index 60a04474..2e316de1 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -1,11 +1,11 @@ import { getLanguage } from '@/lang/index' import Access from '@adempiere/grpc-access-client' -import { HOST_GRPC_AUTHENTICATION } from '@/api/ADempiere/constants' +import { ACCESS_ADDRESS } from '@/api/ADempiere/constants' // Instance for connection function Instance() { return new Access( - HOST_GRPC_AUTHENTICATION, + ACCESS_ADDRESS, 'Version Epale', getLanguage() || 'en_US' )