Skip to content

Commit

Permalink
[feat]: 장바구니 카운트 조회 api 요청 함수작성(#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
devkyoung2 committed Jun 28, 2024
1 parent 5e9f398 commit ba69901
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/services/api/v1/cart.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CartResponse } from 'types/cart';
import { CartResponse, CartCountResponse } from 'types/cart';

import { apiV1 } from '.';

Expand All @@ -7,3 +7,9 @@ export const getCartItems = async () => {

return cartItems.data as CartResponse;
};

export const getCartCount = async () => {
const cartCount = await apiV1.get(`/cart/itemCount`);

return cartCount.data as CartCountResponse;
};

0 comments on commit ba69901

Please sign in to comment.