Skip to content
This repository has been archived by the owner on Jan 5, 2025. It is now read-only.

Commit

Permalink
add app version
Browse files Browse the repository at this point in the history
  • Loading branch information
rodriguestiago0 committed Jul 23, 2024
1 parent e658d79 commit 2dbd121
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- TZ=Europe/Lisbon
- EDENRED_USERNAME=
- EDENRED_PIN=
- EDENRED_VERSION= # default 4.1.0
- EDENRED_ACCOUNT_MAP=comma separated vlue (Both EDENRED_ACCOUNT_MAP and ACTUAL_ACCOUNT_MAP need to have the same size)
- ACTUAL_ACCOUNT_MAP=#comma separated vlue
- ACTUAL_SERVER_URL=
Expand All @@ -29,6 +30,7 @@ services:
docker run -d --name myedenredactual \
- e 'EDENRED_USERNAME=' \
- e 'EDENRED_PIN=' \
- e 'EDENRED_VERSION=' \
- e 'EDENRED_ACCOUNT_MAP=' \
- e 'ACTUAL_ACCOUNT_MAP=' \
- e 'ACTUAL_SERVER_URL= ' \
Expand Down
2 changes: 2 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const ACTUAL_SERVER_PASSWORD = process.env.ACTUAL_SERVER_PASSWORD || "";
const APP_PORT = process.env.APP_PORT || 3000;

const APP_URL = process.env.APP_URL || "http://localhost"
const EDENRED_VERSION = process.env.EDENRED_VERSION || "4.1.0";

const EDENRED_USERNAME = process.env.EDENRED_USERNAME || "";
const EDENRED_PIN = process.env.EDENRED_PIN || "";
Expand All @@ -34,6 +35,7 @@ function getAppConfigFromEnv() {
APP_URL,
EDENRED_USERNAME,
EDENRED_PIN,
EDENRED_VERSION,
EDENRED_ACCOUNT_MAP,
ACTUAL_ACCOUNT_MAPPING,
EDENRED_ACCOUNT_MAPPING,
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ services:
- PUID=1003
- PGID=100
- TZ=Europe/Lisbon
#- EDENRED_USERNAME= deprecated for now
#- EDENRED_PASSWORD=deprecated for now
- EDENRED_TOKEN=
- EDENRED_USERNAME=
- EDENRED_PIN=
- EDENRED_VERSION= # default 4.1.0
- EDENRED_ACCOUNT_MAP= #comma separated vlue (Both EDENRED_ACCOUNT_MAP and ACTUAL_ACCOUNT_MAP need to have the same size)
- ACTUAL_ACCOUNT_MAP= #comma separated vlue
- ACTUAL_SERVER_URL=
Expand Down
2 changes: 1 addition & 1 deletion edenredService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const authenticate = async () => {
appType: "IOS",
appVersion: "4.1.0"
};
const token = await fetch('https://www.myedenred.pt/edenred-customer/v2/authenticate/pin?appVersion=4.1.0&appType=IOS&channel=MOBILE', {
const token = await fetch('https://www.myedenred.pt/edenred-customer/v2/authenticate/pin?appVersion='+ appConfig.EDENRED_VERSION +'&appType=IOS&channel=MOBILE', {
method: 'POST',
body: JSON.stringify(u),
headers: {
Expand Down

0 comments on commit 2dbd121

Please sign in to comment.