WonhyeongLee / lwh-membership-page

인물 후원 컨셉사이트
https://lwh-membership.vercel.app
0 stars 1 forks source link

add membership-information api endpoint #26

Closed WonhyeongLee closed 6 months ago

WonhyeongLee commented 6 months ago

개요

MSW을 사용해 아래 코드와 같이 membershipInformation/api/membership-information 에서 반환하도록 구현했는데

export const handlers = [
  http.get('/api/membership-information', () => {
    return HttpResponse.json(membershipInformation);
  }),
];

이걸 배포하기 위해 Next의 api/membership-information/route.ts 에 해당 요청에 대해 json데이터를 반환하도록 구현합니다.

예상 결과

배포환경에서 Mock api 대신 배포주소/api/membership-information 에 데이터를 요청할 수 있게 구현합니다.

github-actions[bot] commented 6 months ago

A branch has been created for this issue: feature/26-add_membership-information_api_endpoint.