Skip to content

Commit 7c089cd

Browse files
committed
Merge branch 'dev' of https://github.com/oodd-team/oodd-web-react into feat/OD-131
2 parents ad945a4 + 1bd1d97 commit 7c089cd

73 files changed

Lines changed: 996 additions & 1210 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/prod_cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
echo "VITE_GOOGLE_CLIENT_ID=${{ secrets.VITE_GOOGLE_CLIENT_ID }}" >> .env
3737
echo "VITE_GOOGLE_CLIENT_SECRET=${{ secrets.VITE_GOOGLE_CLIENT_SECRET }}" >> .env
3838
39-
- run: yarn build-prod
39+
- run: yarn build
4040

4141
- name: deploy to s3
4242
uses: jakejarvis/s3-sync-action@master

src/apis/auth/dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { BaseSuccessResponse } from '../core/dto';
44
export type getUserInfoByJwtResponse = BaseSuccessResponse<getUserInfoByJwtData>;
55
// jwt를 이용한 사용자 정보 조회 응답 데이터
66
export interface getUserInfoByJwtData {
7-
userId: string;
7+
userId: number;
88
name: string;
99
phoneNumber: string;
1010
email: string;

src/apis/post-comment/dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface Comment {
2929

3030
// 댓글 관련 User 정보
3131
export interface CommentUser {
32-
userId: number;
32+
id: number;
3333
nickname: string;
3434
profilePictureUrl: string;
3535
}

src/apis/post/dto.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ export interface PostBase {
3030
}
3131
export interface CreatePostData extends PostBase {}
3232
export interface PostSummary {
33-
postId: number;
33+
id: number;
3434
content: string;
3535
postImages: PostImage[];
3636
createdAt: Date;
3737
isPostLike: boolean;
3838
user: User;
39+
requestStatus: boolean;
3940
}
4041
export interface GetPostListData {
4142
post: PostSummary[];
@@ -72,12 +73,16 @@ export interface GetPostDetailData extends PostBase {
7273
isPostWriter: boolean;
7374
}
7475
export interface User {
75-
userId: number;
76+
id: number;
7677
nickname: string;
7778
profilePictureUrl: string;
7879
}
7980
export interface PostImage {
80-
imageUrl: string;
81+
id?: number;
82+
status?: string;
83+
createdAt?: string;
84+
updatedAt?: string;
85+
url: string;
8186
orderNum: number;
8287
}
8388
export interface PostClothing {

src/apis/user-block/dto.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// 차단/해제 요청 데이터
2+
export interface PostUserBlockRequest {
3+
fromUserId: number;
4+
toUserId: number;
5+
action: 'block' | 'unblock'; // 차단 또는 해제
6+
}

src/apis/user-block/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { PostUserBlockRequest } from './dto';
2+
import { EmptySuccessResponse } from '../core/dto';
3+
import { newRequest } from '../core';
4+
5+
// 유저 차단 api
6+
export const postUserBlockApi = (data: PostUserBlockRequest) =>
7+
newRequest.post<EmptySuccessResponse>('/user-block', data);

src/apis/user-report/dto.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// 사용자 신고 요청 데이터
2+
export interface PostUserReportRequest {
3+
fromUserId: number;
4+
toUserId: number;
5+
reason: string;
6+
}

src/apis/user-report/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { PostUserReportRequest } from './dto';
2+
import { EmptySuccessResponse } from '../core/dto';
3+
import { newRequest } from '../core';
4+
5+
// 유저 신고 api
6+
export const postUserReportApi = (data: PostUserReportRequest) =>
7+
newRequest.post<EmptySuccessResponse>('/user-report', data);

src/apis/user/dto.ts

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,20 @@ import { BaseSuccessResponse } from '../core/dto';
22

33
// 사용자 정보 공통 인터페이스
44
export interface UserInfoData {
5-
userId: string;
5+
userId: number;
66
name: string;
77
phoneNumber: string;
88
email: string;
99
nickname: string;
1010
profilePictureUrl: string;
1111
bio: string;
12-
joinedAt?: string; // user 공통 인터페이스에 이 두 개는 안 나와있어서 일단 이것들만 optional 처리했습니다...
13-
isFriend?: boolean;
12+
birthDate: string; // user 공통 인터페이스에 이 두 개는 안 나와있어서 일단 이것들만 optional 처리했습니다...
13+
isFriend: boolean;
1414
}
1515

1616
// 사용자 정보 조회 응답
1717
export type GetUserInfoResponse = BaseSuccessResponse<UserInfoData>;
1818

19-
// 사용자 신고 요청 데이터
20-
export interface PostUserReportRequest {
21-
fromUserId: number;
22-
toUserId: number;
23-
reason: string;
24-
}
25-
26-
// 차단/해제 요청 데이터
27-
export interface PostUserBlockRequest {
28-
fromUserId: number;
29-
toUserId: number;
30-
action: 'block' | 'unblock'; // 차단 또는 해제
31-
}
32-
3319
// 사용자 정보 수정 응답
3420
export type PatchUserInfoResponse = BaseSuccessResponse<UserInfoData>;
3521

src/apis/user/index.ts

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
1-
import {
2-
PostUserBlockRequest,
3-
PostUserReportRequest,
4-
PatchUserInfoRequest,
5-
PatchUserInfoResponse,
6-
PatchUserWithDrawResponse,
7-
} from './dto';
1+
import { GetUserInfoResponse, PatchUserInfoRequest, PatchUserInfoResponse, PatchUserWithDrawResponse } from './dto';
82
import { newRequest } from '../core';
93
import { EmptySuccessResponse } from '../core/dto';
104

115
// 유저 정보 수정 api
12-
export const patchUserInfoApi = (data: PatchUserInfoRequest, userId: string) =>
6+
export const patchUserInfoApi = (data: PatchUserInfoRequest, userId: number) =>
137
newRequest.patch<PatchUserInfoResponse>(`/user/${userId}`, data);
148

159
// 유저 탈퇴 api
16-
export const patchUserWithdrawApi = (userId: string) =>
10+
export const patchUserWithdrawApi = (userId: number) =>
1711
newRequest.patch<PatchUserWithDrawResponse>(`/user/${userId}/withdraw`);
1812

19-
// 유저 차단 api
20-
export const postUserBlockApi = (data: PostUserBlockRequest) =>
21-
newRequest.post<EmptySuccessResponse>('/user-block', data);
22-
23-
// 유저 신고 api
24-
export const postUserReportApi = (data: PostUserReportRequest) =>
25-
newRequest.post<EmptySuccessResponse>('/user-report', data);
26-
2713
// 이용 약관 동의 api
28-
export const postTermsAgreementApi = (userId: string) => newRequest.post<EmptySuccessResponse>(`/user/${userId}`);
14+
export const postTermsAgreementApi = (userId: number) => newRequest.post<EmptySuccessResponse>(`/user/${userId}`);
15+
16+
// 유저 정보 조회 api
17+
export const getUserInfoApi = (userId: number) => newRequest.get<GetUserInfoResponse>(`/user/${userId}`);

0 commit comments

Comments
 (0)