From ba699010de29f68886707f7c7acd31a4bb94dc88 Mon Sep 17 00:00:00 2001 From: devkyoung2 Date: Fri, 28 Jun 2024 15:52:36 +0900 Subject: [PATCH] =?UTF-8?q?[feat]:=20=EC=9E=A5=EB=B0=94=EA=B5=AC=EB=8B=88?= =?UTF-8?q?=20=EC=B9=B4=EC=9A=B4=ED=8A=B8=20=EC=A1=B0=ED=9A=8C=20api=20?= =?UTF-8?q?=EC=9A=94=EC=B2=AD=20=ED=95=A8=EC=88=98=EC=9E=91=EC=84=B1(#385)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/api/v1/cart.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/services/api/v1/cart.ts b/src/services/api/v1/cart.ts index cb914568..56edae80 100644 --- a/src/services/api/v1/cart.ts +++ b/src/services/api/v1/cart.ts @@ -1,4 +1,4 @@ -import { CartResponse } from 'types/cart'; +import { CartResponse, CartCountResponse } from 'types/cart'; import { apiV1 } from '.'; @@ -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; +};