Skip to content

Commit

Permalink
fix: api route경로
Browse files Browse the repository at this point in the history
fix: api route경로
  • Loading branch information
Cllaude99 authored Aug 22, 2024
2 parents 2ff7274 + f299dc9 commit 237928a
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions src/components/Modal/PlaceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,15 @@ export default function PlaceModal({ isOpen, onClose }: ModalProps) {
localStorage.removeItem('refreshToken');
localStorage.removeItem('roomId');
if (selectedOption === 'friend') {
const { data } = await axios.post(
BACKEND_URL + '/api/rooms',
{
roomType: ROOM_TYPE_EACH,
},
{ withCredentials: true },
);
const { data } = await axios.post(BACKEND_URL + '/api/rooms', {
roomType: ROOM_TYPE_EACH,
});
setRoomId(data.data.id);
setCurrentView('shareLink');
} else {
const { data } = await axios.post(
BACKEND_URL + '/api/rooms',
{
roomType: ROOM_TYPE_ALONE,
},
{
withCredentials: true,
},
);
const { data } = await axios.post(BACKEND_URL + '/api/rooms', {
roomType: ROOM_TYPE_ALONE,
});
const newRoomId = data.data.id;
navigate(`/page/a/results/${newRoomId}`);
}
Expand Down

0 comments on commit 237928a

Please sign in to comment.