Skip to content

Commit 30db5ca

Browse files
committed
Update api
1 parent 7d2f7fe commit 30db5ca

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

frontend/src/utils/api.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
import axios from "axios";
22

33
const getUserUrl = () => {
4-
return import.meta.env.SOME_ENV_VAR_HERE ?? "http://localhost:3001/api";
4+
return import.meta.env.VITE_USER_SERVICE_URL ?? "http://localhost:3001/api";
55
};
66

77
const getQuestionsUrl = () => {
88
return (
9-
import.meta.env.SOME_ENV_VAR_HERE ?? "http://localhost:3000/api/questions"
9+
import.meta.env.VITE_QN_SERVICE_URL ?? "http://localhost:3000/api/questions"
1010
);
1111
};
1212

1313
const getCodeExecutionUrl = () => {
14-
return import.meta.env.SOME_ENV_VAR_HERE ?? "http://localhost:3004/api/run";
14+
return (
15+
import.meta.env.VITE_CODE_EXEC_SERVICE_URL ??
16+
"http://localhost:3004/api/run"
17+
);
1518
};
1619

1720
const getQnHistoriesUrl = () => {
1821
return (
19-
import.meta.env.SOME_ENV_VAR_HERE ?? "http://localhost:3006/api/qnhistories"
22+
import.meta.env.VITE_QN_HIST_SERVICE_URL ??
23+
"http://localhost:3006/api/qnhistories"
2024
);
2125
};
2226

0 commit comments

Comments
 (0)