Skip to content

Commit

Permalink
refactor: post -> create 네이밍 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
cindy committed Feb 12, 2023
1 parent 31771c6 commit 837e180
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/apis/review/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export interface ICreateReviewPayload {
flavorIds: number[];
}

export const postReview = async (payload: ICreateReviewPayload) => {
export const createReview = async (payload: ICreateReviewPayload) => {
const res = await request<ICreateReviewResponseData>({
method: 'post',
url: '/api/v1/reviews',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/reviews/create/[beerId].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NextPage, GetServerSideProps } from 'next';
import { RecoilRoot } from 'recoil';

import { getBeer } from '@/apis/beers/getBeer';
import { getReview, postReview } from '@/apis/review';
import { getReview, createReview } from '@/apis/review';
import Header, { HEADER_HEIGHT } from '@/components/Header';
import { BackButton } from '@/components/Header/extras';
import SwiperLayout from '@/components/layouts/SwiperLayout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useMutation } from 'react-query';
import { useRecoilValue } from 'recoil';

import { useGetFlavors } from '@/apis/flavors';
import { ICreateReviewPayload, postReview, uploadImage } from '@/apis/review';
import { ICreateReviewPayload, createReview, uploadImage } from '@/apis/review';
import BottomFloatingButtonArea from '@/components/BottomFloatingButtonArea';
import { BOTTOM_FLOATING_BUTTON_AREA_HEIGHT } from '@/components/BottomFloatingButtonArea/BottomFloatingButtonArea';
import Button, { ButtonCount } from '@/components/Button';
Expand Down Expand Up @@ -39,7 +39,7 @@ const ReviewDetailContainer: React.FC<RecordThirdStepContainerProps> = ({
const reviewForm = useRecoilValue($reviewForm);
const { data: flavors } = useGetFlavors();
const { mutateAsync: uploadImageMutation } = useMutation(uploadImage);
const { mutateAsync: createReviewMutation } = useMutation(postReview);
const { mutateAsync: createReviewMutation } = useMutation(createReview);
// const { mutateAsync: updateRecordMutation } = useMutation(updateRecord, {
// onSuccess: () => {
// router.back();
Expand Down

0 comments on commit 837e180

Please sign in to comment.