From f476607549ea9df1faffb2652b4181f45cd4ef90 Mon Sep 17 00:00:00 2001 From: soonki-98 Date: Wed, 30 Nov 2022 20:24:09 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20barList=20=EC=A1=B0=ED=9A=8C=20api=20de?= =?UTF-8?q?fault=20param=20=EC=88=98=EC=A0=95=20#32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/bar.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/apis/bar.ts b/src/apis/bar.ts index a4f800f..ef295f6 100644 --- a/src/apis/bar.ts +++ b/src/apis/bar.ts @@ -1,19 +1,18 @@ import { BarType } from '@lib/types'; import RestAPI from './restapi'; - class BarAPI { -/** - * 술집 목록 조회 - * @param latitude - * @param longitude - * @param zoomLevel - * @param moodTag - * @param drinkTag - */ + /** + * 술집 목록 조회 + * @param latitude + * @param longitude + * @param zoomLevel + * @param moodTag + * @param drinkTag + */ public async getBarList(data: BarType.barSearchTyoe) { try { - const { latitude, longitude, zoomLevel, moodTag, drinkTag } = data; + const { latitude, longitude, zoomLevel = 6, moodTag = '', drinkTag = '' } = data; const result = await RestAPI.get( `/api/bars?latitude=${latitude}&longitude=${longitude}&level=${zoomLevel}&barMoodTagNames=${moodTag}&barAlcoholTagNames=${drinkTag}` );