Skip to content

Commit ae03831

Browse files
authored
Merge pull request #126 from oodd-team/feat/OD-172
[OD-172] eslint-plugin-import 적용 테스트
2 parents 0054a53 + 04ae98b commit ae03831

21 files changed

Lines changed: 545 additions & 491 deletions

File tree

src/apis/auth/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { newRequest } from '@apis/core';
2+
23
import type { getUserInfoByJwtResponse } from './dto';
34

45
// jwt로 사용자 정보 조회 api /auth/me

src/apis/core/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import axios, {
55
AxiosResponse,
66
InternalAxiosRequestConfig,
77
} from 'axios';
8+
89
import { NEW_JWT_KEY } from '../../config/constant';
910

1011
// 기존 서버 응답 타입

src/apis/matching/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { newRequest } from '@apis/core';
2+
23
import type {
34
CreateMatchingRequest,
45
CreateMatchingResponse,

src/apis/post-comment/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import { newRequest } from '../core';
2-
import { CreateCommentRequest, CreateCommentResponse, GetCommentListResponse } from './dto';
31
import { EmptySuccessResponse } from '../core/dto';
42

3+
import { CreateCommentRequest, CreateCommentResponse, GetCommentListResponse } from './dto';
4+
5+
import { newRequest } from '../core';
6+
57
// 게시글 댓글 생성 API
68
export const createCommentApi = (postId: number, data: CreateCommentRequest) =>
79
newRequest.post<CreateCommentResponse>(`/post-comment?postId=${postId}`, data);

src/apis/post-like/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { newRequest } from '../core';
21
import { TogglePostLikeStatusResponse, GetPostLikeListResponse } from './dto';
32

3+
import { newRequest } from '../core';
4+
45
// 게시글 좋아요 누르기/취소
56
export const togglePostLikeStatusApi = (postId: number) =>
67
newRequest.post<TogglePostLikeStatusResponse>(`/post-like/${postId}`);

src/apis/post-report/dto.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
11
import { BaseSuccessResponse } from '../core/dto';
22

33
interface BaseReport {
4-
id: number; // 신고 ID
5-
userId: number; // 신고 생성 사용자 ID
6-
postId: number; // 신고된 게시글 ID
7-
content: string; // 신고된 게시글 내용
8-
repostReason: string; // 신고 사유
4+
id: number; // 신고 ID
5+
userId: number; // 신고 생성 사용자 ID
6+
postId: number; // 신고된 게시글 ID
7+
content: string; // 신고된 게시글 내용
8+
repostReason: string; // 신고 사유
99
}
1010

1111
// 게시글 신고 요청 DTO
1212
export interface SendPostReportRequest {
13-
requesterId: number; // 신고하는 사용자 ID
14-
postId: number; // 신고 대상 게시글 ID
15-
reason: string; // 신고 사유
13+
requesterId: number; // 신고하는 사용자 ID
14+
postId: number; // 신고 대상 게시글 ID
15+
reason: string; // 신고 사유
1616
}
1717

1818
// 게시물 신고 응답 데이터
1919
export interface SendPostReportData extends BaseReport {
20-
requesterId: number; // 신고하는 사용자 ID
21-
postId: number; // 신고 대상 게시글 ID
22-
reason: string; // 신고 사유
20+
requesterId: number; // 신고하는 사용자 ID
21+
postId: number; // 신고 대상 게시글 ID
22+
reason: string; // 신고 사유
2323
}
2424

2525
// 게시물 신고 응답 타입
2626
export type SendPostReportResponse = BaseSuccessResponse<SendPostReportData>;
27-

src/apis/post-report/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { newRequest } from "../core";
2-
import { SendPostReportRequest, SendPostReportResponse } from "./dto";
1+
import { SendPostReportRequest, SendPostReportResponse } from './dto';
2+
3+
import { newRequest } from '../core';
34

45
// 게시글 신고 API
56
export const sendPostReportApi = (data: SendPostReportRequest) =>
6-
newRequest.post<SendPostReportResponse>('/post-report', data);
7+
newRequest.post<SendPostReportResponse>('/post-report', data);

src/apis/post/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { newRequest } from '../core';
1+
import { EmptySuccessResponse } from '../core/dto';
2+
23
import {
34
CreatePostRequest,
45
CreatePostResponse,
@@ -8,7 +9,8 @@ import {
89
ModifyPostRequest,
910
ModifyPostResponse,
1011
} from './dto';
11-
import { EmptySuccessResponse } from '../core/dto';
12+
13+
import { newRequest } from '../core';
1214

1315
// 게시글 생성
1416
export const createPostApi = (data: CreatePostRequest) => newRequest.post<CreatePostResponse>('/post', data);

src/apis/user-block/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { newRequest } from '@apis/core';
2+
23
import type { EmptySuccessResponse } from '@apis/core/dto';
4+
35
import type { PostUserBlockRequest } from './dto';
46

57
// 유저 차단 api

src/apis/user-report/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { newRequest } from '@apis/core';
2+
23
import type { EmptySuccessResponse } from '@apis/core/dto';
4+
35
import type { PostUserReportRequest } from './dto';
46

57
// 유저 신고 api

0 commit comments

Comments
 (0)