From 0982bc09c771b993548ca9520fb1fb4c6c7cee99 Mon Sep 17 00:00:00 2001 From: Shilpa Chauhan <101130846+chauhanshilpa@users.noreply.github.com> Date: Fri, 31 May 2024 16:25:07 +0530 Subject: [PATCH] change http to https --- app/components/profile_components/EditProfilePopup.tsx | 2 +- .../CategoriesAndGenderDetailsPopup.tsx | 4 ++-- app/components/random_chat_components/RandomChatNavbar.tsx | 4 ++-- app/components/random_chat_components/Sidebar.tsx | 2 +- app/components/random_chat_components/SidebarList.tsx | 2 +- app/components/reusable/CategoriesDropdown.tsx | 2 +- app/utils/Zklogin.tsx | 4 ++-- app/utils/getUserByIdFunction.tsx | 2 +- app/voyager/cult/page.tsx | 4 ++-- app/voyager/profile/[id]/page.tsx | 2 +- app/voyager/profile/page.tsx | 2 +- app/voyager/random_chat/[id]/page.tsx | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/components/profile_components/EditProfilePopup.tsx b/app/components/profile_components/EditProfilePopup.tsx index 17b02f7..31188de 100644 --- a/app/components/profile_components/EditProfilePopup.tsx +++ b/app/components/profile_components/EditProfilePopup.tsx @@ -42,7 +42,7 @@ const EditProfilePopup = ({ setIsEditProfileClicked, userAddress, subId }: Props interest: categoryValue.interests, location: "", }; - fetch(`http://${IP_ADDRESS}/v1.0/voyager/user`, { + fetch(`https://${IP_ADDRESS}/v1.0/voyager/user`, { method: "PATCH", headers: { "Content-Type": "application/json", diff --git a/app/components/random_chat_components/CategoriesAndGenderDetailsPopup.tsx b/app/components/random_chat_components/CategoriesAndGenderDetailsPopup.tsx index 236911b..93941ef 100644 --- a/app/components/random_chat_components/CategoriesAndGenderDetailsPopup.tsx +++ b/app/components/random_chat_components/CategoriesAndGenderDetailsPopup.tsx @@ -49,7 +49,7 @@ const CategoriesAndGenderDetailsPopup = () => { updateUserData(); const list: RandomCandidate[] = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user/list-users-interest/${interestValue}/${userId}`, + `https://${IP_ADDRESS}/v1.0/voyager/user/list-users-interest/${interestValue}/${userId}`, { method: "GET", headers: { @@ -82,7 +82,7 @@ const CategoriesAndGenderDetailsPopup = () => { sub_id: subId, interest: interestValue, }; - await fetch(`http://${IP_ADDRESS}/v1.0/voyager/user`, { + await fetch(`https://${IP_ADDRESS}/v1.0/voyager/user`, { method: "PATCH", headers: { "Content-Type": "application/json", diff --git a/app/components/random_chat_components/RandomChatNavbar.tsx b/app/components/random_chat_components/RandomChatNavbar.tsx index 450cc7d..3b87144 100644 --- a/app/components/random_chat_components/RandomChatNavbar.tsx +++ b/app/components/random_chat_components/RandomChatNavbar.tsx @@ -45,7 +45,7 @@ const RandomChatNavbar = ({ like, setLike, setFriendList }: Props) => { friends: friendId, }; - await fetch(`http://${IP_ADDRESS}/v1.0/voyager/user_friends`, { + await fetch(`https://${IP_ADDRESS}/v1.0/voyager/user_friends`, { method: "POST", headers: { "Content-Type": "application/json", @@ -69,7 +69,7 @@ const RandomChatNavbar = ({ like, setLike, setFriendList }: Props) => { async function getUpdatedFriendList() { const userFriends: UserFriendInterface[] = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user_friends/${cachedUserId}`, + `https://${IP_ADDRESS}/v1.0/voyager/user_friends/${cachedUserId}`, { method: "GET", headers: { diff --git a/app/components/random_chat_components/Sidebar.tsx b/app/components/random_chat_components/Sidebar.tsx index 46e1069..76d65d8 100644 --- a/app/components/random_chat_components/Sidebar.tsx +++ b/app/components/random_chat_components/Sidebar.tsx @@ -33,7 +33,7 @@ const Sidebar = ({ friendList, setFriendList, setLike }: Props) => { if (typeof window !== undefined) { const userId = localStorage.getItem("userId"); const userFriends: UserFriendInterface[] = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user_friends/${userId}`, + `https://${IP_ADDRESS}/v1.0/voyager/user_friends/${userId}`, { method: "GET", headers: { diff --git a/app/components/random_chat_components/SidebarList.tsx b/app/components/random_chat_components/SidebarList.tsx index b733600..1f1f68d 100644 --- a/app/components/random_chat_components/SidebarList.tsx +++ b/app/components/random_chat_components/SidebarList.tsx @@ -30,7 +30,7 @@ const SidebarList = ({ if (typeof window !== undefined) { const userId = localStorage.getItem("userId"); fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user_friends/${userId}/${userData.friends}`, + `https://${IP_ADDRESS}/v1.0/voyager/user_friends/${userId}/${userData.friends}`, { method: "DELETE", headers: { diff --git a/app/components/reusable/CategoriesDropdown.tsx b/app/components/reusable/CategoriesDropdown.tsx index 35122d1..1ab3329 100644 --- a/app/components/reusable/CategoriesDropdown.tsx +++ b/app/components/reusable/CategoriesDropdown.tsx @@ -36,7 +36,7 @@ const CategoriesDropdown = ({ if (!isMenuOpen) { try { const response = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/categories/${category}` + `https://${IP_ADDRESS}/v1.0/voyager/categories/${category}` ); const list = await response.json(); if (category === "interests") { diff --git a/app/utils/Zklogin.tsx b/app/utils/Zklogin.tsx index f8e042b..17e0eba 100644 --- a/app/utils/Zklogin.tsx +++ b/app/utils/Zklogin.tsx @@ -95,7 +95,7 @@ export const Zklogin = ({ let getUserData; // send a get request to get data of user saved in db. getUserData = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user/sub-id/${userData.sub}`, + `https://${IP_ADDRESS}/v1.0/voyager/user/sub-id/${userData.sub}`, { method: "GET", headers: { @@ -135,7 +135,7 @@ export const Zklogin = ({ if (typeof window !== "undefined") { localStorage.setItem("userId", newUserData.id); } - fetch(`http://${IP_ADDRESS}/v1.0/voyager/user`, { + fetch(`https://${IP_ADDRESS}/v1.0/voyager/user`, { method: "POST", headers: { "Content-Type": "application/json", diff --git a/app/utils/getUserByIdFunction.tsx b/app/utils/getUserByIdFunction.tsx index 6616697..a180cea 100644 --- a/app/utils/getUserByIdFunction.tsx +++ b/app/utils/getUserByIdFunction.tsx @@ -3,7 +3,7 @@ const IP_ADDRESS = process.env.NEXT_PUBLIC_SERVER_IP_ADDRESS; export async function getUserByIdFunction(userId: string | null) { // send a get request to get data of user saved in db. const response = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user/${userId}`, + `https://${IP_ADDRESS}/v1.0/voyager/user/${userId}`, { method: "GET", headers: { diff --git a/app/voyager/cult/page.tsx b/app/voyager/cult/page.tsx index 6bb618a..0da3dbc 100644 --- a/app/voyager/cult/page.tsx +++ b/app/voyager/cult/page.tsx @@ -96,7 +96,7 @@ const Cult = () => { setUserAddress(userData.userAddr); let getUserData; getUserData = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user/sub-id/${userData.sub}`, + `https://${IP_ADDRESS}/v1.0/voyager/user/sub-id/${userData.sub}`, { method: "GET", headers: { @@ -127,7 +127,7 @@ const Cult = () => { name: "", provider: userData, }; - fetch(`http://${IP_ADDRESS}/v1.0/voyager/user`, { + fetch(`https://${IP_ADDRESS}/v1.0/voyager/user`, { method: "POST", headers: { "Content-Type": "application/json", diff --git a/app/voyager/profile/[id]/page.tsx b/app/voyager/profile/[id]/page.tsx index 4815d7c..abcf1da 100644 --- a/app/voyager/profile/[id]/page.tsx +++ b/app/voyager/profile/[id]/page.tsx @@ -92,7 +92,7 @@ const FriendProfile = () => { (async function () { // send a get request to get data of user saved in db. getUserData = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user/${params.id}`, + `https://${IP_ADDRESS}/v1.0/voyager/user/${params.id}`, { method: "GET", headers: { diff --git a/app/voyager/profile/page.tsx b/app/voyager/profile/page.tsx index 614698a..0575b4e 100644 --- a/app/voyager/profile/page.tsx +++ b/app/voyager/profile/page.tsx @@ -44,7 +44,7 @@ const Profile = () => { (async function () { // send a get request to get data of user saved in db. getUserData = await fetch( - `http://${IP_ADDRESS}/v1.0/voyager/user/sub-id/${subId}`, + `https://${IP_ADDRESS}/v1.0/voyager/user/sub-id/${subId}`, { method: "GET", headers: { diff --git a/app/voyager/random_chat/[id]/page.tsx b/app/voyager/random_chat/[id]/page.tsx index 0b23969..ab29c24 100644 --- a/app/voyager/random_chat/[id]/page.tsx +++ b/app/voyager/random_chat/[id]/page.tsx @@ -35,7 +35,7 @@ const NewChat = () => { const params = useParams(); const receiverUserId = params.id; - const IP_ADDRESS = process.env.NEXT_PUBLIC_SERVER_IP_ADDRESS; + const IP_ADDRESS = process.env.NEXT_PUBLIC_WEB_SOCKET_SERVER_IP_ADDRESS; useEffect(() => { if (typeof window !== undefined) {