From 443aa5513c5555c7525f62161876c14eb60be9fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EA=B0=80=EA=B2=BD?= Date: Tue, 21 Nov 2023 23:14:07 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Setting:=20api=20url=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 포트 제거 --- front/src/apis/axios.ts | 2 +- front/src/components/ExitModal.tsx | 6 +-- front/src/components/PointHistoryModal.tsx | 6 +-- front/src/components/UpdateRPDModal.tsx | 6 +-- front/src/pages/hostroom/[roomName].tsx | 4 +- front/src/pages/mypage.tsx | 54 +++++++++++----------- front/src/pages/mypageedit.tsx | 26 +++++------ front/src/pages/practiceroom.tsx | 4 +- 8 files changed, 54 insertions(+), 54 deletions(-) diff --git a/front/src/apis/axios.ts b/front/src/apis/axios.ts index cc9eeb65..705a23ba 100644 --- a/front/src/apis/axios.ts +++ b/front/src/apis/axios.ts @@ -1,6 +1,6 @@ import axios from "axios"; -const SERVER_URL = "https://stepup-pi.com:8080/api"; +const SERVER_URL = "https://stepup-pi.com/api"; export const axiosUser = axios.create({ baseURL: SERVER_URL + "/user" diff --git a/front/src/components/ExitModal.tsx b/front/src/components/ExitModal.tsx index f5624102..af835a50 100644 --- a/front/src/components/ExitModal.tsx +++ b/front/src/components/ExitModal.tsx @@ -23,7 +23,7 @@ const Modal = (props: props): ReactElement => { // 회원 탈퇴 const leaveStepup = async () => { - await axios.delete(`https://stepup-pi.com:8080/api/user?id=${id}`, { + await axios.delete(`https://stepup-pi.com/api/user?id=${id}`, { headers: { Authorization: `Bearer ${accessToken}` }, @@ -42,7 +42,7 @@ const Modal = (props: props): ReactElement => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.delete(`https://stepup-pi.com:8080/api/user?id=${id}`, { + axios.delete(`https://stepup-pi.com/api/user?id=${id}`, { headers: { refreshToken: refreshToken }, @@ -52,7 +52,7 @@ const Modal = (props: props): ReactElement => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.delete(`https://stepup-pi.com:8080/api/user?id=${id}`, { + axios.delete(`https://stepup-pi.com/api/user?id=${id}`, { headers: { Authorization: `Bearer ${accessToken}` }, diff --git a/front/src/components/PointHistoryModal.tsx b/front/src/components/PointHistoryModal.tsx index 76d3ed7c..92102dd5 100644 --- a/front/src/components/PointHistoryModal.tsx +++ b/front/src/components/PointHistoryModal.tsx @@ -25,7 +25,7 @@ const Modal = (props: props): ReactElement => { const router = useRouter(); // 포인트 적립 내역 조회 - axios.get("https://stepup-pi.com:8080/api/rank/my/history", { + axios.get("https://stepup-pi.com/api/rank/my/history", { headers: { Authorization: `Bearer ${accessToken}` }, @@ -37,7 +37,7 @@ const Modal = (props: props): ReactElement => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.get("https://stepup-pi.com:8080/api/rank/my/history", { + axios.get("https://stepup-pi.com/api/rank/my/history", { headers: { refreshToken: refreshToken }, @@ -47,7 +47,7 @@ const Modal = (props: props): ReactElement => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.get("https://stepup-pi.com:8080/api/rank/my/history", { + axios.get("https://stepup-pi.com/api/rank/my/history", { headers: { Authorization: `Bearer ${accessToken}` }, diff --git a/front/src/components/UpdateRPDModal.tsx b/front/src/components/UpdateRPDModal.tsx index ed93febc..af2c77d9 100644 --- a/front/src/components/UpdateRPDModal.tsx +++ b/front/src/components/UpdateRPDModal.tsx @@ -46,7 +46,7 @@ const Modal = (props: props): ReactElement => { // 랜플댄 수정 const updateRPD = async () => { - await axios.put("https://stepup-pi.com:8080/api/dance/my", { + await axios.put("https://stepup-pi.com/api/dance/my", { randomDanceId: props.randomDanceId, title: roomTitle.current?.value, content: roomContent.current?.value, @@ -72,7 +72,7 @@ const Modal = (props: props): ReactElement => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.put("https://stepup-pi.com:8080/api/dance/my", { + axios.put("https://stepup-pi.com/api/dance/my", { randomDanceId: props.randomDanceId, title: roomTitle.current?.value, content: roomContent.current?.value, @@ -93,7 +93,7 @@ const Modal = (props: props): ReactElement => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.put("https://stepup-pi.com:8080/api/dance/my", { + axios.put("https://stepup-pi.com/api/dance/my", { randomDanceId: props.randomDanceId, title: roomTitle.current?.value, content: roomContent.current?.value, diff --git a/front/src/pages/hostroom/[roomName].tsx b/front/src/pages/hostroom/[roomName].tsx index f057e8a7..88f2a55e 100644 --- a/front/src/pages/hostroom/[roomName].tsx +++ b/front/src/pages/hostroom/[roomName].tsx @@ -165,7 +165,7 @@ const Hostroom = () => { useEffect(() => { socketRef.current = io.connect(SOCKET_SERVER_URL); - axios.get('https://stepup-pi.com:8080/api/music',{ + axios.get('https://stepup-pi.com/api/music',{ params:{ keyword: "", }, @@ -178,7 +178,7 @@ const Hostroom = () => { } }).catch((error: any) => { if(error.response.data.message === "만료된 토큰"){ - axios.get('https://stepup-pi.com:8080/api/music',{ + axios.get('https://stepup-pi.com/api/music',{ params:{ keyword: "", }, diff --git a/front/src/pages/mypage.tsx b/front/src/pages/mypage.tsx index b5aabe78..0128630d 100644 --- a/front/src/pages/mypage.tsx +++ b/front/src/pages/mypage.tsx @@ -107,7 +107,7 @@ const MyPage = () => { } else { const setup = async () => { // 로그인 유저 정보 조회 - await axios.get("https://stepup-pi.com:8080/api/user", { + await axios.get("https://stepup-pi.com/api/user", { headers: { Authorization: `Bearer ${accessToken}` } @@ -150,7 +150,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.get("https://stepup-pi.com:8080/api/user", { + axios.get("https://stepup-pi.com/api/user", { headers: { refreshToken: refreshToken, } @@ -160,7 +160,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.get("https://stepup-pi.com:8080/api/user", { + axios.get("https://stepup-pi.com/api/user", { headers: { Authorization: `Bearer ${accessToken}` } @@ -218,7 +218,7 @@ const MyPage = () => { }) // 로그인 유저가 작성한 정모 게시글 조회 - await axios.get(`https://stepup-pi.com:8080/api/board/meeting/my`, { + await axios.get(`https://stepup-pi.com/api/board/meeting/my`, { headers: { Authorization: `Bearer ${accessToken}` } @@ -229,7 +229,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.get(`https://stepup-pi.com:8080/api/board/meeting/my`, { + axios.get(`https://stepup-pi.com/api/board/meeting/my`, { headers: { refreshToken: refreshToken } @@ -239,7 +239,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.get(`https://stepup-pi.com:8080/api/board/meeting/my`, { + axios.get(`https://stepup-pi.com/api/board/meeting/my`, { headers: { Authorization: `Bearer ${accessToken}` } @@ -265,7 +265,7 @@ const MyPage = () => { }) // 로그인 유저가 작성한 자유게시판 게시글 조회 - await axios.get(`https://stepup-pi.com:8080/api/board/talk/my`, { + await axios.get(`https://stepup-pi.com/api/board/talk/my`, { headers: { Authorization: `Bearer ${accessToken}` } @@ -277,7 +277,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.get(`https://stepup-pi.com:8080/api/board/talk/my`, { + axios.get(`https://stepup-pi.com/api/board/talk/my`, { headers: { refreshToken: refreshToken } @@ -287,7 +287,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.get(`https://stepup-pi.com:8080/api/board/talk/my`, { + axios.get(`https://stepup-pi.com/api/board/talk/my`, { headers: { Authorization: `Bearer ${accessToken}` } @@ -314,7 +314,7 @@ const MyPage = () => { }) // 로그인 유저의 랜플댄 예약 목록 조회 - await axios.get("https://stepup-pi.com:8080/api/dance/my/reserve", { + await axios.get("https://stepup-pi.com/api/dance/my/reserve", { headers: { Authorization: `Bearer ${accessToken}` } @@ -325,7 +325,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.get("https://stepup-pi.com:8080/api/dance/my/reserve", { + axios.get("https://stepup-pi.com/api/dance/my/reserve", { headers: { refreshToken: refreshToken } @@ -335,7 +335,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.get("https://stepup-pi.com:8080/api/dance/my/reserve", { + axios.get("https://stepup-pi.com/api/dance/my/reserve", { headers: { Authorization: `Bearer ${accessToken}` } @@ -361,7 +361,7 @@ const MyPage = () => { }) // 로그인 유저가 개최한 랜플댄 목록 조회 - await axios.get("https://stepup-pi.com:8080/api/dance/my/open", { + await axios.get("https://stepup-pi.com/api/dance/my/open", { headers: { Authorization: `Bearer ${accessToken}` } @@ -371,7 +371,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.get("https://stepup-pi.com:8080/api/dance/my/open", { + axios.get("https://stepup-pi.com/api/dance/my/open", { headers: { refreshToken: refreshToken } @@ -381,7 +381,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then((data) => { - axios.get("https://stepup-pi.com:8080/api/dance/my/open", { + axios.get("https://stepup-pi.com/api/dance/my/open", { headers: { Authorization: `Bearer ${accessToken}` } @@ -406,7 +406,7 @@ const MyPage = () => { }) // 로그인 유저가 참여한 랜플댄 목록 조회 - await axios.get("https://stepup-pi.com:8080/api/dance/my/attend/", { + await axios.get("https://stepup-pi.com/api/dance/my/attend/", { headers: { Authorization: `Bearer ${accessToken}` }, @@ -416,7 +416,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.get("https://stepup-pi.com:8080/api/dance/my/attend/", { + axios.get("https://stepup-pi.com/api/dance/my/attend/", { headers: { refreshToken: refreshToken }, @@ -426,7 +426,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.get("https://stepup-pi.com:8080/api/dance/my/attend/", { + axios.get("https://stepup-pi.com/api/dance/my/attend/", { headers: { Authorization: `Bearer ${accessToken}` }, @@ -459,7 +459,7 @@ const MyPage = () => { // 로그인 유저의 랜플댄 예약 취소 const cancelRandomDance = async (selectedId: any) => { - await axios.delete(`https://stepup-pi.com:8080/api/dance/my/reserve/${selectedId.reservationId}`, { + await axios.delete(`https://stepup-pi.com/api/dance/my/reserve/${selectedId.reservationId}`, { headers: { Authorization: `Bearer ${accessToken}` } @@ -472,7 +472,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.delete(`https://stepup-pi.com:8080/api/dance/my/reserve/${selectedId.reservationId}`, { + axios.delete(`https://stepup-pi.com/api/dance/my/reserve/${selectedId.reservationId}`, { headers: { refreshToken: refreshToken } @@ -482,7 +482,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.delete(`https://stepup-pi.com:8080/api/dance/my/reserve/${selectedId.reservationId}`, { + axios.delete(`https://stepup-pi.com/api/dance/my/reserve/${selectedId.reservationId}`, { headers: { Authorization: `Bearer ${accessToken}` } @@ -512,7 +512,7 @@ const MyPage = () => { // 로그인 유저가 개최한 랜플댄 삭제 const deleteMyRandomDance = async (roomid: any) => { - await axios.delete(`https://stepup-pi.com:8080/api/dance/my/${roomid.rpdId}`, { + await axios.delete(`https://stepup-pi.com/api/dance/my/${roomid.rpdId}`, { headers: { Authorization: `Bearer ${accessToken}` }, @@ -525,7 +525,7 @@ const MyPage = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.delete(`https://stepup-pi.com:8080/api/dance/my/${roomid.rpdId}`, { + axios.delete(`https://stepup-pi.com/api/dance/my/${roomid.rpdId}`, { headers: { refreshToken: refreshToken }, @@ -535,7 +535,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.delete(`https://stepup-pi.com:8080/api/dance/my/${roomid.rpdId}`, { + axios.delete(`https://stepup-pi.com/api/dance/my/${roomid.rpdId}`, { headers: { Authorization: `Bearer ${accessToken}` }, @@ -567,7 +567,7 @@ const MyPage = () => { const checkPw = async () => { setCheckPassword(pwValue.current!.value); try { - axios.post("https://stepup-pi.com:8080/api/user/checkpw", { + axios.post("https://stepup-pi.com/api/user/checkpw", { id: id, password: pwValue.current!.value, }, { @@ -583,7 +583,7 @@ const MyPage = () => { }).catch((error: any) => { setEqualPw(false); if (error.response.data.message === "만료된 토큰") { - axios.post("https://stepup-pi.com:8080/api/user/checkpw", { + axios.post("https://stepup-pi.com/api/user/checkpw", { id: id, password: pwValue.current!.value, }, { @@ -596,7 +596,7 @@ const MyPage = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.post("https://stepup-pi.com:8080/api/user/checkpw", { + axios.post("https://stepup-pi.com/api/user/checkpw", { id: id, password: pwValue.current!.value, }, { diff --git a/front/src/pages/mypageedit.tsx b/front/src/pages/mypageedit.tsx index a64e1977..eb339c71 100644 --- a/front/src/pages/mypageedit.tsx +++ b/front/src/pages/mypageedit.tsx @@ -80,7 +80,7 @@ const MyPageEdit = () => { }, []); useEffect(() => { - axios.get('https://stepup-pi.com:8080/api/user/country', { + axios.get('https://stepup-pi.com/api/user/country', { }).then((data) => { if (data.data.message === "국가 코드 목록 조회 완료") { setCountries(data.data.data); @@ -91,7 +91,7 @@ const MyPageEdit = () => { // 닉네임 중복 여부 체크 const nicknameCheck = async () => { try { - axios.post("https://stepup-pi.com:8080/api/user/dupnick", { + axios.post("https://stepup-pi.com/api/user/dupnick", { nickname: nicknameValue.current!.value, }, { headers: { @@ -107,7 +107,7 @@ const MyPageEdit = () => { }).catch((error: any) => { setNicknameFlag(false); if (error.response.data.message === "만료된 토큰") { - axios.post("https://stepup-pi.com:8080/api/user/dupnick", { + axios.post("https://stepup-pi.com/api/user/dupnick", { nickname: nicknameValue.current!.value, }, { headers: { @@ -119,7 +119,7 @@ const MyPageEdit = () => { setRefreshToken(data.data.data.refreshToken); } }).then((data) => { - axios.post("https://stepup-pi.com:8080/api/user/dupnick", { + axios.post("https://stepup-pi.com/api/user/dupnick", { nickname: nicknameValue.current!.value, }, { headers: { @@ -154,7 +154,7 @@ const MyPageEdit = () => { // 이메일 중복 체크 const emailCheck = async () => { try { - axios.post("https://stepup-pi.com:8080/api/user/dupemail", { + axios.post("https://stepup-pi.com/api/user/dupemail", { email: emailValue.current!.value, }, { headers: { @@ -170,7 +170,7 @@ const MyPageEdit = () => { }).catch((error: any) => { setNicknameFlag(false); if (error.response.data.message === "만료된 토큰") { - axios.post("https://stepup-pi.com:8080/api/user/dupemail", { + axios.post("https://stepup-pi.com/api/user/dupemail", { email: emailValue.current!.value, }, { headers: { @@ -182,7 +182,7 @@ const MyPageEdit = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.post("https://stepup-pi.com:8080/api/user/dupemail", { + axios.post("https://stepup-pi.com/api/user/dupemail", { email: emailValue.current!.value, }, { headers: { @@ -287,7 +287,7 @@ const MyPageEdit = () => { try { uploadImg().then((fileName: any) => { - axios.put("https://stepup-pi.com:8080/api/user", { + axios.put("https://stepup-pi.com/api/user", { email: emailValue.current.value, emailAlert: agreeToReceiveEmail, countryId: countryId, @@ -308,7 +308,7 @@ const MyPageEdit = () => { }).catch((error: any) => { // alert('회원 정보 수정에 실패했습니다. 관리자에게 문의해주세요.'); if (error.response.data.message === "만료된 토큰") { - axios.put("https://stepup-pi.com:8080/api/user", { + axios.put("https://stepup-pi.com/api/user", { email: emailValue.current.value, emailAlert: agreeToReceiveEmail, countryId: countryId, @@ -325,7 +325,7 @@ const MyPageEdit = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.put("https://stepup-pi.com:8080/api/user", { + axios.put("https://stepup-pi.com/api/user", { email: emailValue.current.value, emailAlert: agreeToReceiveEmail, countryId: countryId, @@ -368,7 +368,7 @@ const MyPageEdit = () => { alert("비밀번호를 다시 확인해주세요."); return; } - await axios.patch("https://stepup-pi.com:8080/api/user/pw", { + await axios.patch("https://stepup-pi.com/api/user/pw", { password: pw2Value.current.value, }, { headers: { @@ -383,7 +383,7 @@ const MyPageEdit = () => { } }).catch((error: any) => { if (error.response.data.message === "만료된 토큰") { - axios.patch("https://stepup-pi.com:8080/api/user/pw", { + axios.patch("https://stepup-pi.com/api/user/pw", { password: pw2Value.current.value, }, { headers: { @@ -395,7 +395,7 @@ const MyPageEdit = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.patch("https://stepup-pi.com:8080/api/user/pw", { + axios.patch("https://stepup-pi.com/api/user/pw", { password: pw2Value.current.value, }, { headers: { diff --git a/front/src/pages/practiceroom.tsx b/front/src/pages/practiceroom.tsx index ac24406f..5b28918f 100644 --- a/front/src/pages/practiceroom.tsx +++ b/front/src/pages/practiceroom.tsx @@ -121,7 +121,7 @@ const PracticeRoom = () => { useEffect(() => { getLocalStream(); - axios.get("https://stepup-pi.com:8080/api/music",{ + axios.get("https://stepup-pi.com/api/music",{ params:{ keyword: "", }, @@ -147,7 +147,7 @@ const PracticeRoom = () => { setRefreshToken(data.data.data.refreshToken); } }).then(() => { - axios.get("https://stepup-pi.com:8080/api/music",{ + axios.get("https://stepup-pi.com/api/music",{ params:{ keyword: "", },