Skip to content

Commit

Permalink
feat: 피드 수정, 작성 Request DTO를 entities/feed/model/types.ts 에 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
suhwan2004 committed Nov 3, 2024
1 parent 3f423bf commit bc165ca
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/app/mocks/handlers/feed.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
import { http } from 'msw';

import { IReportFeedReqDTO, IWriteFeedReqDTO } from '@/entities/feed';

import { feedMockData } from '../data';
import { createHttpErrorResponse, createHttpSuccessResponse } from '../lib';

interface IReportFeedReqDTO {
category: string;
content: string;
isBlind: boolean;
}

interface IWriteFeedReqDTO {
content: string;
images: string[];
scope: TFeedScope;
}

type TFeedScope = 'public' | 'friends' | 'private';

export const feedHandlers = [
// 1️⃣ 피드 신고
http.post('http://api.example.com/v2/feeds/:feedId/reports', async ({ request, params }) => {
Expand Down
1 change: 1 addition & 0 deletions src/entities/feed/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './model';
1 change: 1 addition & 0 deletions src/entities/feed/model/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './types';
13 changes: 13 additions & 0 deletions src/entities/feed/model/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export interface IReportFeedReqDTO {
category: string;
content: string;
isBlind: boolean;
}

export interface IWriteFeedReqDTO {
content: string;
images: string[];
scope: TFeedScope;
}

export type TFeedScope = 'public' | 'friends' | 'private';

0 comments on commit bc165ca

Please sign in to comment.