Skip to content

Commit f9c003c

Browse files
ai api
1 parent 8bb1377 commit f9c003c

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

API_Gateway/src/routes.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,23 @@ const ROUTES = [
1616
},
1717
},
1818
},
19+
{
20+
url: "/api",
21+
auth: true,
22+
creditCheck: false,
23+
rateLimit: {
24+
windowMs: 60 * 1000,
25+
limit: 100,
26+
},
27+
proxy: {
28+
// target: "http://localhost:5000/codespaces",
29+
target: "http://codespace-service:5000/api",
30+
changeOrigin: true,
31+
pathRewrite: {
32+
[`^/api`]: "",
33+
},
34+
},
35+
},
1936
{
2037
url: "/free",
2138
auth: false,

Codespace_Service/src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const app = express();
1010
app.use(cors());
1111
app.use(express.json());
1212

13+
app.use("/api", aiRoutes);
1314
app.use("/codespaces", codespaceRoutes);
1415
app.use("/codespaces", memberRoutes);
15-
app.use("/api", aiRoutes);
1616
app.use(errorHandler);
1717

1818
app.get("/health", (req, res) => {

Frontend/src/components/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function Login() {
4949
provider: "google",
5050
options: {
5151
redirectTo:
52-
"https://68aee7a468a50f41d684ab8b--rtc-editor.netlify.app/login",
52+
"https://68aee7a468a50f41d684ab8b--rtc-editor.netlify.app/dashboard",
5353
},
5454
});
5555

0 commit comments

Comments
 (0)