Skip to content

Commit

Permalink
미들웨어 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
DHyeon98 committed Jun 24, 2024
1 parent 604a76a commit b1ea564
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ export const axiosInstance = axios.create({
headers: {
'Content-Type': 'application/json',
},
withCredentials: true,
});

export const axiosFileInstance = axios.create({
baseURL: process.env.NEXT_PUBLIC_API_URL,
headers: {
'Content-Type': 'multipart/form-data',
},
withCredentials: true,
});

let isRefreshing = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default function DeleteModal({ Modal, handleModal, isOpen }: ModalType) {
const handleDelete = async () => {
try {
await myFamilyApi.myFamilyDelete();
deleteCookie('accessToken');
deleteCookie('refreshToken');
deleteCookie('AccessToken');
deleteCookie('RefreshToken');
router.push('/');
} catch {
console.log('에러');
Expand Down
4 changes: 2 additions & 2 deletions pages/calendar/[calendarId]/edit/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export async function getServerSideProps(context: GetServerSidePropsContext) {
const {
params: { calendarId },
req: {
cookies: { accessToken },
cookies: { AccessToken },
},
} = context as Params;

const data = await fetchTodoById(calendarId, accessToken);
const data = await fetchTodoById(calendarId, AccessToken);

return { props: { todo: data } };
}
Expand Down

0 comments on commit b1ea564

Please sign in to comment.