Forráskód Böngészése

Revert endpoint to staging

Vishnu Mohandas 4 éve
szülő
commit
5d4dc2e671
2 módosított fájl, 8 hozzáadás és 8 törlés
  1. 7 7
      src/pages/api/[...all].ts
  2. 1 1
      src/utils/common/apiUtil.ts

+ 7 - 7
src/pages/api/[...all].ts

@@ -1,15 +1,15 @@
 import { createProxyMiddleware } from 'http-proxy-middleware';
 import { createProxyMiddleware } from 'http-proxy-middleware';
 
 
 export const config = {
 export const config = {
-  api: {
-    bodyParser: false,
-  },
+    api: {
+      bodyParser: false,
+    },
 };
 };
 
 
-const API_ENDPOINT = process.env.NEXT_PUBLIC_ENTE_ENDPOINT || "http://192.168.0.100";
+const API_ENDPOINT = process.env.NEXT_PUBLIC_ENTE_ENDPOINT || "https://api.staging.ente.io";
 
 
 export default createProxyMiddleware({
 export default createProxyMiddleware({
-  target: API_ENDPOINT,
-  changeOrigin: true,
-  pathRewrite: { '^/api': '/' },
+    target: API_ENDPOINT,
+    changeOrigin: true,
+    pathRewrite: { '^/api': '/' },
 });
 });

+ 1 - 1
src/utils/common/apiUtil.ts

@@ -1,6 +1,6 @@
 export const getEndpoint = () => {
 export const getEndpoint = () => {
     const dev = process.env.NODE_ENV === 'development';
     const dev = process.env.NODE_ENV === 'development';
-    const apiEndpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT || "http://192.168.0.100";
+    const apiEndpoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT || "https://api.staging.ente.io";
     const endpoint = !dev ? apiEndpoint : '/api';
     const endpoint = !dev ? apiEndpoint : '/api';
     return endpoint;
     return endpoint;
 }
 }