Skip to content

Commit

Permalink
feat : 활동후기, 아티클 response 타입 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
f0rever0 committed Oct 27, 2023
1 parent db8cdfb commit 52a09f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/lib/api/remote/review.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -11,11 +11,11 @@ const client = axios.create({

const getResponse = async (
majorTab: number,
subTab: ExtraPart,
subTab: PartCategoryType,
pageNo = 1,
): Promise<GetReviewsResponse> => {
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 });

Expand Down
6 changes: 3 additions & 3 deletions src/lib/api/remote/sopticle.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -18,11 +18,11 @@ const client = axios.create({

const getResponse = async (
majorTab: number,
subTab: ExtraPart,
subTab: PartCategoryType,
pageNo = 1,
): Promise<GetSopticlesResponse> => {
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);
Expand Down

0 comments on commit 52a09f0

Please sign in to comment.