Skip to content

Commit

Permalink
fix: added back mock and prod api configs (#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
sohumshah2 authored Oct 24, 2024
1 parent b33109f commit 6654a14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum Env {
}

interface Config {
timetable: string;
timetable?: string;
auto: string;
server: string;
}
Expand All @@ -23,5 +23,7 @@ export const client = new ApolloClient({
const API_CONFIG: Record<string, Config> = Object.freeze({
[Env.DEV]: { timetable: `${LOCAL}/api`, auto: `${LOCAL}/api/auto`, server: `${LOCAL}/api` },
[Env.TEST]: { timetable: `${LOCAL}/api`, auto: `${LOCAL}/api/auto`, server: `${LOCAL}/api` },
[Env.MOCK]: { auto: `${LOCAL}/api/auto`, server: `${LOCAL}/api` },
[Env.PROD]: { auto: `/api/auto`, server: `/api` },
});
export const API_URL: Config = API_CONFIG[import.meta.env.VITE_APP_ENVIRONMENT || Env.DEV];

0 comments on commit 6654a14

Please sign in to comment.