diff --git a/compose.yml b/compose.yml index 1fc2d49..d67a708 100644 --- a/compose.yml +++ b/compose.yml @@ -13,3 +13,23 @@ services: restart: always ports: - 4200:4200 + server: + container_name: nginx + build: ./nginx + depends_on: + - frontend + restart: always + ports: + - 80:80 + # ngrok: + # image: ngrok/ngrok:latest + # restart: unless-stopped + # command: + # - "start" + # - "--all" + # - "--config" + # - "/etc/ngrok.yml" + # volumes: + # - ./ngrok.yml:/etc/ngrok.yml + # ports: + # - 4040:4040 diff --git a/frontend-ts/src/API/courses/useFetchCourse.tsx b/frontend-ts/src/API/courses/useFetchCourse.tsx index 5f43a04..656aa02 100644 --- a/frontend-ts/src/API/courses/useFetchCourse.tsx +++ b/frontend-ts/src/API/courses/useFetchCourse.tsx @@ -3,7 +3,7 @@ import { keepPreviousData, useQuery } from "@tanstack/react-query"; export default function useFetchCourse() { async function getCourse() { - const { data } = await axios.get("http://localhost:6969/api/courses/"); + const { data } = await axios.get("/api/courses/"); return data; } const data = useQuery({ diff --git a/frontend-ts/src/API/issues/useFetchIssue.tsx b/frontend-ts/src/API/issues/useFetchIssue.tsx index 21e8fc6..e739854 100644 --- a/frontend-ts/src/API/issues/useFetchIssue.tsx +++ b/frontend-ts/src/API/issues/useFetchIssue.tsx @@ -3,7 +3,7 @@ import { keepPreviousData, useQuery } from "@tanstack/react-query"; export default function useFetchIssue() { async function getIssue() { - const { data } = await axios.get("http://localhost:6969/api/issues/"); + const { data } = await axios.get("/api/issues/"); return data; } const data = useQuery({ diff --git a/frontend-ts/src/API/professors/useFetchProfessor.tsx b/frontend-ts/src/API/professors/useFetchProfessor.tsx index 3e3210a..276e75e 100644 --- a/frontend-ts/src/API/professors/useFetchProfessor.tsx +++ b/frontend-ts/src/API/professors/useFetchProfessor.tsx @@ -3,7 +3,7 @@ import { keepPreviousData, useQuery } from "@tanstack/react-query"; export default function useFetchProfessor() { async function getProfessors() { - const { data } = await axios.get("http://localhost:6969/api/professors/"); + const { data } = await axios.get("/api/professors/"); return data; } const data = useQuery({ diff --git a/frontend-ts/src/API/sections/useFetchSection.tsx b/frontend-ts/src/API/sections/useFetchSection.tsx index 55e3300..9d376e3 100644 --- a/frontend-ts/src/API/sections/useFetchSection.tsx +++ b/frontend-ts/src/API/sections/useFetchSection.tsx @@ -3,7 +3,7 @@ import { keepPreviousData, useQuery } from "@tanstack/react-query"; export default function useFetchSection() { async function getSection() { - const { data } = await axios.get("http://localhost:6969/api/sections/"); + const { data } = await axios.get("/api/sections/"); return data; } const data = useQuery({ diff --git a/frontend-ts/src/API/tickets/useFetchTicket.tsx b/frontend-ts/src/API/tickets/useFetchTicket.tsx index 271d395..ce875a1 100644 --- a/frontend-ts/src/API/tickets/useFetchTicket.tsx +++ b/frontend-ts/src/API/tickets/useFetchTicket.tsx @@ -3,7 +3,7 @@ import { keepPreviousData, useQuery } from "@tanstack/react-query"; export default function useFetchTicket() { async function getTicket() { - const { data } = await axios.get("http://localhost:6969/api/tickets/"); + const { data } = await axios.get("/api/tickets/"); return data; } const data = useQuery({ diff --git a/frontend-ts/src/API/tutors/useFetchTutor.tsx b/frontend-ts/src/API/tutors/useFetchTutor.tsx index 68b9590..95017a4 100644 --- a/frontend-ts/src/API/tutors/useFetchTutor.tsx +++ b/frontend-ts/src/API/tutors/useFetchTutor.tsx @@ -3,7 +3,7 @@ import { keepPreviousData, useQuery } from "@tanstack/react-query"; export default function useFetchTutor() { async function getTutors() { - const { data } = await axios.get("http://localhost:6969/api/tutors/"); + const { data } = await axios.get("/api/tutors/"); return data; } const data = useQuery({ diff --git a/frontend-ts/src/components/forms/TicketForm.tsx b/frontend-ts/src/components/forms/TicketForm.tsx index ad844c4..ca16280 100644 --- a/frontend-ts/src/components/forms/TicketForm.tsx +++ b/frontend-ts/src/components/forms/TicketForm.tsx @@ -295,7 +295,6 @@ export default function TicketForm() { /> no courses found... - {courses?.data.map((course: any) => (