From 52a09f07f41f91a77885acd2c3f8e1e99f1d46de Mon Sep 17 00:00:00 2001 From: f0ever0 Date: Fri, 27 Oct 2023 18:16:33 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20=ED=99=9C=EB=8F=99=ED=9B=84=EA=B8=B0?= =?UTF-8?q?,=20=EC=95=84=ED=8B=B0=ED=81=B4=20response=20=ED=83=80=EC=9E=85?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 1 + src/lib/api/remote/review.ts | 6 +++--- src/lib/api/remote/sopticle.ts | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..ac250177 --- /dev/null +++ b/package-lock.json @@ -0,0 +1 @@ + "lockfileVersion": 3, diff --git a/src/lib/api/remote/review.ts b/src/lib/api/remote/review.ts index 9be9377d..00b3c4c1 100644 --- a/src/lib/api/remote/review.ts +++ b/src/lib/api/remote/review.ts @@ -1,5 +1,5 @@ import { BASE_URL, DEFAULT_TIMEOUT } from '@src/lib/constants/client'; -import { ExtraPart, PartExtraType } from '@src/lib/types/universal'; +import { PartCategoryType } from '@src/lib/types/blog'; import axios from 'axios'; import qs from 'qs'; import { GetReviewsResponse, GetSampleReviewsResponse, ReviewAPI } from '../../types/review'; @@ -11,11 +11,11 @@ const client = axios.create({ const getResponse = async ( majorTab: number, - subTab: ExtraPart, + subTab: PartCategoryType, pageNo = 1, ): Promise => { const generationParameter = majorTab === 0 ? {} : { generation: majorTab }; - const partParameter = subTab === PartExtraType.ALL ? {} : { part: subTab }; + const partParameter = subTab === PartCategoryType.ALL ? {} : { part: subTab }; const pageParameter = { pageNo, limit: 6 }; const parameter = qs.stringify({ ...partParameter, ...pageParameter, ...generationParameter }); diff --git a/src/lib/api/remote/sopticle.ts b/src/lib/api/remote/sopticle.ts index 7272add2..c96d9b61 100644 --- a/src/lib/api/remote/sopticle.ts +++ b/src/lib/api/remote/sopticle.ts @@ -1,11 +1,11 @@ import { BASE_URL, DEFAULT_TIMEOUT } from '@src/lib/constants/client'; import { BlogPostType } from '@src/lib/types/blog'; +import { PartCategoryType } from '@src/lib/types/blog'; import { GetSopticlesResponse, PostSopticleLikeResponse, SopticleAPI, } from '@src/lib/types/sopticle'; -import { ExtraPart, PartExtraType } from '@src/lib/types/universal'; import { getStorageHandler } from '@src/lib/utils/storageHandler'; import axios from 'axios'; import { nanoid } from 'nanoid'; @@ -18,11 +18,11 @@ const client = axios.create({ const getResponse = async ( majorTab: number, - subTab: ExtraPart, + subTab: PartCategoryType, pageNo = 1, ): Promise => { const generationParameter = majorTab === 0 ? {} : { generation: majorTab }; - const partParameter = subTab === PartExtraType.ALL ? {} : { part: subTab }; + const partParameter = subTab === PartCategoryType.ALL ? {} : { part: subTab }; const pageParameter = { pageNo, limit: 6 }; const sessionStorageHandler = getStorageHandler('sessionStorage'); const sessionId = sessionStorageHandler.getItemOrGenerate('session-id', nanoid);