Skip to content

Commit

Permalink
Suppression de variables d'environnement inutiles
Browse files Browse the repository at this point in the history
  • Loading branch information
NerOcrO committed Jul 24, 2024
1 parent 219890c commit 5121785
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 26 deletions.
3 changes: 0 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
VITE_APP_API=http://localhost:8080
VITE_APP_STRATEGYAUTH=local
VITE_APP_CV_FILE_MAX_SIZE=10485760
VITE_APP_PIX_CAMPAGNE_URL=https://app.pix.fr/campagnes/1234
VITE_APP_PIX_URL=https://app.pix.fr/connexion
8 changes: 2 additions & 6 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,8 @@ jobs:
- name: Override .env
uses: SpicyPizza/[email protected]
with:
envkey_VITE_APP_STRATEGYAUTH: "local"
envkey_VITE_APP_VERSION: "1.0"
envkey_VITE_APP_API: ${{ secrets.VITE_APP_API_DEMO }}
envkey_VITE_APP_CV_FILE_MAX_SIZE: 10485760
envkey_VITE_APP_PIX_CAMPAGNE_URL: ${{ secrets.VITE_APP_PIX_CAMPAGNE_URL }}
envkey_VITE_APP_PIX_URL: "https://app.pix.fr/connexion"
envkey_VITE_APP_API: ${{ secrets.REACT_APP_API_DEMO }}
envkey_VITE_APP_PIX_CAMPAGNE_URL: ${{ secrets.REACT_APP_PIX_CAMPAGNE_URL }}
file_name: .env
- name: copy robots.txt
uses: canastro/copy-file-action@master
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,8 @@ jobs:
- name: Override .env
uses: SpicyPizza/[email protected]
with:
envkey_VITE_APP_STRATEGYAUTH: "local"
envkey_VITE_APP_VERSION: "1.0"
envkey_VITE_APP_API: ${{ secrets.VITE_APP_API_PRODUCTION }}
envkey_VITE_APP_CV_FILE_MAX_SIZE: 10485760
envkey_VITE_APP_PIX_CAMPAGNE_URL: ${{ secrets.VITE_APP_PIX_CAMPAGNE_URL }}
envkey_VITE_APP_PIX_URL: "https://app.pix.fr/connexion"
envkey_VITE_APP_API: ${{ secrets.REACT_APP_API_PRODUCTION }}
envkey_VITE_APP_PIX_CAMPAGNE_URL: ${{ secrets.REACT_APP_PIX_CAMPAGNE_URL }}
file_name: .env
- name: Build application
run: npm run build
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/deploy-recette.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,8 @@ jobs:
- name: Override .env
uses: SpicyPizza/[email protected]
with:
envkey_VITE_APP_STRATEGYAUTH: "local"
envkey_VITE_APP_VERSION: "1.0"
envkey_VITE_APP_API: ${{ secrets.VITE_APP_API_RECETTE }}
envkey_VITE_APP_CV_FILE_MAX_SIZE: 10485760
envkey_VITE_APP_PIX_CAMPAGNE_URL: ${{ secrets.VITE_APP_PIX_CAMPAGNE_URL }}
envkey_VITE_APP_PIX_URL: "https://app.pix.fr/connexion"
envkey_VITE_APP_API: ${{ secrets.REACT_APP_API_RECETTE }}
envkey_VITE_APP_PIX_CAMPAGNE_URL: ${{ secrets.REACT_APP_PIX_CAMPAGNE_URL }}
file_name: .env
- name: copy robots.txt
uses: canastro/copy-file-action@master
Expand Down
5 changes: 2 additions & 3 deletions src/components/connected/MonEspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function MonEspace() {
const sendMail = useSelector(state => state?.user?.sendMail);
const blob = useSelector(state => state.conseiller?.blob);
const lienCampagnePix = `${import.meta.env.VITE_APP_PIX_CAMPAGNE_URL}?participantExternalId=${conseiller?.idPG}`;
const lienPix = `${import.meta.env.VITE_APP_PIX_URL}`;

const [infos, setInfos] = useState({
nom: conseiller?.nom,
Expand Down Expand Up @@ -64,7 +63,7 @@ function MonEspace() {
'text/pdf': ['.pdf']
},
maxFiles: 1,
maxSize: import.meta.env.VITE_APP_CV_FILE_MAX_SIZE
maxSize: 10485760
});

const downloadCV = () => {
Expand Down Expand Up @@ -249,7 +248,7 @@ function MonEspace() {
Elle est accessible depuis la rubrique <strong>&quot;Certification&quot;</strong>
en cliquant sur <strong>&quot;Voir mes certifications&quot;</strong>.
</p>
<a href={lienPix}
<a href="https://app.pix.fr/connexion"
target="blank"
rel="noopener noreferrer"
title="Je me connecte à mon compte Pix"
Expand Down
3 changes: 1 addition & 2 deletions src/services/user.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export const userService = {
};

function login(username, password) {

const strategy = import.meta.env.VITE_APP_STRATEGYAUTH;
const strategy = 'local';
const apiUrlAuth = `${import.meta.env.VITE_APP_API}/authentication`;

const requestOptions = {
Expand Down

0 comments on commit 5121785

Please sign in to comment.