Skip to content
Snippets Groups Projects
Commit 11d4d56a authored by YAHYAOUI Firas's avatar YAHYAOUI Firas
Browse files

edit: use https if app is deployed

parent ee272773
No related branches found
No related tags found
1 merge request!2edit: use https if app is deployed
Pipeline #19765 passed
......@@ -7,6 +7,7 @@ type FormulaireProps = {
const PORT = process.env.PORT || 5000;
const URL = `http://0.0.0.0:${PORT}`;
const API_URL = process.env.APP_URL ? `https://${process.env.APP_URL}:${PORT}` : URL;
const Formulaire = ({ selection }: FormulaireProps) => {
const getFormsGroups = (selection: number) => {
......@@ -97,7 +98,7 @@ const Formulaire = ({ selection }: FormulaireProps) => {
const { isPending, isError, error, data } = useQuery({
queryKey: ["arrets"],
queryFn: async () => {
const result = await fetch(`${URL}/get_all_stations/`);
const result = await fetch(`${API_URL}/get_all_stations/`);
return result.json();
},
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment