Skip to content

Commit

Permalink
hardcoded backend to remote
Browse files Browse the repository at this point in the history
  • Loading branch information
palldas committed Jun 2, 2024
1 parent ba908ab commit 0b32b11
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion frontend/lib/deletes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { IBasket } from "../../backend/models/basketSchema";
import { IItem } from "../../backend/models/itemSchema";
import { fetchGroup } from "./fetches";

const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
const vite_backend_url = "https://gather-app-307.azurewebsites.net";
const token = localStorage.getItem("token");

export const handleDeleteGroup = async (groupId: string) => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/lib/edits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { IItem } from "../../backend/models/itemSchema";
import { IUser } from "../../backend/models/userSchema";
import { IGroup } from "../../backend/models/groupSchema";

const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;

// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
const vite_backend_url = "https://gather-app-307.azurewebsites.net";
type updatedGroup = {
groupName: string;
description: string;
Expand Down
3 changes: 2 additions & 1 deletion frontend/lib/fetches.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { IBasket } from "../../backend/models/basketSchema";
import { ObjectId } from "mongoose";
import { addUserToGroup, addGroupToUser } from "./edits";

const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
const vite_backend_url = "https://gather-app-307.azurewebsites.net";

export const fetchBasket = async (basketId: string) => {
return fetch(`${vite_backend_url}/baskets/${basketId}`, {
Expand Down
3 changes: 2 additions & 1 deletion frontend/lib/posts.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ObjectId } from "mongoose";

const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
const vite_backend_url = "https://gather-app-307.azurewebsites.net";
console.log("Backend URL:", vite_backend_url);

type newUser = {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { IUser } from "../../backend/models/userSchema";
import MoveLetters from "./components/moveLetters";
import theme from "./theme";

const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
const vite_backend_url = "https://gather-app-307.azurewebsites.net";

console.log("Backend URL:", vite_backend_url);

// The azure deployed backend url: gather-app-307.azurewebsites.net
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/pages/IndividualGroupPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ import NewBasketOptions from "../components/NewBasketOptions";
import SendInviteToGroup from "../components/SendInvite";
import { fetchUserWithString } from "../../lib/fetches";

const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
// const vite_backend_url = import.meta.env.VITE_BACKEND_URL as string;
const vite_backend_url = "https://gather-app-307.azurewebsites.net";


type Props = {
LoggedInUser: IUser | null;
Expand Down

0 comments on commit 0b32b11

Please sign in to comment.