Skip to content

Conversation

@junjeeong
Copy link
Collaborator

@junjeeong junjeeong commented Nov 6, 2024

설명

  1. 대부분 id는 그냥 id로 넣어주시면 되고, body는 http요청할때 body에 담아줄 데이터인데 함수 호출할 때 객체로 담아서 인자로 전달해주시면 됩니다.

  2. axiosInstanceApi.ts에 proxy라는 인스턴스를 추가했습니다. 이유는 인증이 필요한 요청은 모두 API Routes를 이용한 넥스트 서버로 우회하게 되기 때문에 BaseURL을 달리해주기 위함입니다.

  3. (2)번과 동일한데 axiosInstance.post는 클라이언트에서 바로 백엔드로 가는 요청이고 proxy.post는 백엔드 서버가 아닌 저희가 앞으로 만들 /pages 아래 /api 안에 만들 서버함수로 갑니다.

Copy link
Contributor

@mungyun mungyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔하게 정리해주셨군요👍

Copy link
Collaborator

@99minji 99minji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우와.. 엄청 빠르고 깔끔하게 정리해주셨네요 감사합니다 👍👍

@junjeeong junjeeong merged commit b8f4cd4 into develop Nov 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants