Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix frontend url issues #49

Merged
merged 4 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .do/deploy.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ spec:
envs:
- key: REACT_APP_JURY_NAME
scope: RUN_AND_BUILD_TIME
- key: REACT_APP_JURY_URL
scope: RUN_AND_BUILD_TIME
value: /api
- key: JURY_ADMIN_PASSWORD
scope: RUN_AND_BUILD_TIME
- key: MONGODB_URI
Expand All @@ -14,6 +17,7 @@ spec:
scope: RUN_AND_BUILD_TIME
- key: EMAIL_PORT
scope: RUN_AND_BUILD_TIME
value: "587"
- key: EMAIL_FROM
scope: RUN_AND_BUILD_TIME
- key: EMAIL_PASSWORD
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ COPY ["client/package.json", "client/tailwind.config.js", "client/tsconfig.json"
ARG NODE_ENV=production
ARG REACT_APP_JURY_NAME
ARG REACT_APP_HUB
ARG REACT_APP_JURY_URL

RUN yarn install
RUN yarn build
Expand Down
8 changes: 4 additions & 4 deletions client/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function getRequest<T>(path: string, auth: string): Promise<FetchRe
const response = await fetch(`${BACKEND_URL}${path}`, options);
const data = await response.json();
return { status: response.status, error: data.error ? data.error : '', data };
// eslint-disable-next-line
// eslint-disable-next-line
} catch (error: any) {
console.error(error);
return { status: 404, error: error, data: null };
Expand All @@ -39,7 +39,7 @@ export async function postRequest<T>(
const response = await fetch(`${BACKEND_URL}${path}`, options);
const data = await response.json();
return { status: response.status, error: data.error ? data.error : '', data };
// eslint-disable-next-line
// eslint-disable-next-line
} catch (error: any) {
console.error(error);
return { status: 404, error: error, data: null };
Expand All @@ -61,7 +61,7 @@ export async function putRequest<T>(
const response = await fetch(`${BACKEND_URL}${path}`, options);
const data = await response.json();
return { status: response.status, error: data.error ? data.error : '', data };
// eslint-disable-next-line
// eslint-disable-next-line
} catch (error: any) {
console.error(error);
return { status: 404, error: error, data: null };
Expand All @@ -80,7 +80,7 @@ export async function deleteRequest(
const response = await fetch(`${BACKEND_URL}${path}`, options);
const data = await response.json();
return { status: response.status, error: data.error ? data.error : '', data };
// eslint-disable-next-line
// eslint-disable-next-line
} catch (error: any) {
console.error(error);
return { status: 404, error: error, data: null };
Expand Down