Skip to content

Commit

Permalink
change http to https
Browse files Browse the repository at this point in the history
  • Loading branch information
chauhanshilpa committed May 31, 2024
1 parent ee44250 commit 0982bc0
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/components/profile_components/EditProfilePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions app/components/random_chat_components/RandomChatNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion app/components/random_chat_components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion app/components/random_chat_components/SidebarList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion app/components/reusable/CategoriesDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down
4 changes: 2 additions & 2 deletions app/utils/Zklogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion app/utils/getUserByIdFunction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
4 changes: 2 additions & 2 deletions app/voyager/cult/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion app/voyager/profile/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion app/voyager/profile/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion app/voyager/random_chat/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0982bc0

Please sign in to comment.