Skip to content

Commit c50c22c

Browse files
장아영장아영
authored andcommitted
[#141] 🐛 fix merge conflict
2 parents 3f12270 + 234b87e commit c50c22c

18 files changed

+371
-221
lines changed

src/app/(pages)/sign-in/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
'use client'
22

33
import { SubmitHandler, useForm } from 'react-hook-form'
4-
import { SignInRequest } from '@/types/api/auth.types'
54
import { useSignInMutation } from 'queries/auth'
5+
import { SignInRequest } from '@/types/api/Auth.types'
6+
67

78
export default function LoginPage(): JSX.Element {
89
const {

src/app/(pages)/sign-up/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
// import { useRouter } from 'next/navigation'
44
import { SubmitHandler, useForm } from 'react-hook-form'
55

6-
import { SignUpRequest } from '@/types/api/auth.types'
76
import { useSignUpMutation } from 'queries/auth'
87

8+
import { SignUpRequest } from '@/types/api/Auth.types'
9+
10+
911
export default function SignUpPage(): JSX.Element {
1012
// const router = useRouter()
1113
const {

src/app/api/auth/sign-in/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { NextResponse } from 'next/server'
2-
import { SignInRequest, SignInResponse} from '@/types/api/auth.types'
2+
3+
4+
import { SignInRequest, SignInResponse } from '@/types/api/Auth.types'
35
import { HTTPError } from 'ky'
46
import { backendApi } from '@/services/api'
57

src/services/auth/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SignInRequest, SignUpRequest } from '@/types/api/auth.types'
1+
import { SignInRequest, SignUpRequest } from '@/types/api/Auth.types'
22

33
import { backendApi, proxyApi } from '@/services/api'
44

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
- isSuccess: 요청 성공 여부
3+
- code: 응답 코드 (예: TEAM004)
4+
- message: 응답 메시지 (예: "This is a deleted post.")
5+
- result?: 응답 데이터 (제네릭 타입)
6+
*/
7+
interface ApiResponse<T = unknown> {
8+
isSuccess: boolean
9+
code: string
10+
message: string
11+
result?: T
12+
}
Lines changed: 68 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,23 @@ export interface paths {
5757
patch?: never
5858
trace?: never
5959
}
60+
'/v1/my-page/check-nickname': {
61+
parameters: {
62+
query?: never
63+
header?: never
64+
path?: never
65+
cookie?: never
66+
}
67+
get?: never
68+
put?: never
69+
/** 닉네임 중복 체크 */
70+
post: operations['checkNicknameDuplicate']
71+
delete?: never
72+
options?: never
73+
head?: never
74+
patch?: never
75+
trace?: never
76+
}
6077
'/v1/likes': {
6178
parameters: {
6279
query?: never
@@ -797,12 +814,6 @@ export interface components {
797814
* "태그4"
798815
* ] */
799816
tags: string[]
800-
/**
801-
* @description 포트폴리오 이미지 url
802-
* @default default_image_url
803-
* @example 이미지url
804-
*/
805-
portImageUrl: string
806817
/** @description 포트폴리오 링크 리스트 */
807818
links?: components['schemas']['LinkRequest'][]
808819
/** @description 포트폴리오 학력 리스트 */
@@ -1062,6 +1073,19 @@ export interface components {
10621073
/** @description 경력 리스트 */
10631074
careers?: components['schemas']['CareerResponse'][]
10641075
}
1076+
checkNicknameRequest: {
1077+
/**
1078+
* @description 회원 닉네임
1079+
* @example new_nickname
1080+
*/
1081+
nickname: string
1082+
}
1083+
ApiResponseBoolean: {
1084+
isSuccess?: boolean
1085+
code?: string
1086+
message?: string
1087+
result?: boolean
1088+
}
10651089
LikeRequest: {
10661090
/**
10671091
* Format: int64
@@ -1293,12 +1317,6 @@ export interface components {
12931317
*/
12941318
email: string
12951319
}
1296-
ApiResponseBoolean: {
1297-
isSuccess?: boolean
1298-
code?: string
1299-
message?: string
1300-
result?: boolean
1301-
}
13021320
ApiResponseString: {
13031321
isSuccess?: boolean
13041322
code?: string
@@ -1317,11 +1335,6 @@ export interface components {
13171335
* @example 뽀꼬
13181336
*/
13191337
nickname?: string
1320-
/**
1321-
* @description 프로필 사진 url
1322-
* @example aaa.com
1323-
*/
1324-
imageUrl?: string
13251338
/**
13261339
* @description 소개문구
13271340
* @example 간단한 소개글을 작성해보세요!
@@ -2131,6 +2144,34 @@ export interface operations {
21312144
}
21322145
}
21332146
createPortfolio: {
2147+
parameters: {
2148+
query?: never
2149+
header?: never
2150+
path?: never
2151+
cookie?: never
2152+
}
2153+
requestBody?: {
2154+
content: {
2155+
'multipart/form-data': {
2156+
request: components['schemas']['PortfolioCreateRequest']
2157+
/** Format: binary */
2158+
portImage?: string
2159+
}
2160+
}
2161+
}
2162+
responses: {
2163+
/** @description OK */
2164+
200: {
2165+
headers: {
2166+
[name: string]: unknown
2167+
}
2168+
content: {
2169+
'application/json': components['schemas']['ApiResponsePortCreateResponse']
2170+
}
2171+
}
2172+
}
2173+
}
2174+
checkNicknameDuplicate: {
21342175
parameters: {
21352176
query?: never
21362177
header?: never
@@ -2139,7 +2180,7 @@ export interface operations {
21392180
}
21402181
requestBody: {
21412182
content: {
2142-
'application/json': components['schemas']['PortfolioCreateRequest']
2183+
'application/json': components['schemas']['checkNicknameRequest']
21432184
}
21442185
}
21452186
responses: {
@@ -2149,7 +2190,7 @@ export interface operations {
21492190
[name: string]: unknown
21502191
}
21512192
content: {
2152-
'*/*': components['schemas']['ApiResponsePortCreateResponse']
2193+
'*/*': components['schemas']['ApiResponseBoolean']
21532194
}
21542195
}
21552196
}
@@ -2457,9 +2498,13 @@ export interface operations {
24572498
path?: never
24582499
cookie?: never
24592500
}
2460-
requestBody: {
2501+
requestBody?: {
24612502
content: {
2462-
'application/json': components['schemas']['ProfileUpdateRequest']
2503+
'multipart/form-data': {
2504+
request: components['schemas']['ProfileUpdateRequest']
2505+
/** Format: binary */
2506+
profileImage?: string
2507+
}
24632508
}
24642509
}
24652510
responses: {
@@ -2469,7 +2514,7 @@ export interface operations {
24692514
[name: string]: unknown
24702515
}
24712516
content: {
2472-
'*/*': components['schemas']['ApiResponseProfileUpdateResponse']
2517+
'application/json': components['schemas']['ApiResponseProfileUpdateResponse']
24732518
}
24742519
}
24752520
}
@@ -2483,7 +2528,7 @@ export interface operations {
24832528
}
24842529
requestBody: {
24852530
content: {
2486-
'application/json': components['schemas']['PasswordUpdateRequest']
2531+
'multipart/form-data': components['schemas']['PasswordUpdateRequest']
24872532
}
24882533
}
24892534
responses: {
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
/*
2-
path: '/v1/auth'
3-
GET: 로그인한 유저 조회
1+
/**
2+
- path: '/v1/auth'
3+
- GET: 로그인한 유저 조회
44
*/
55
export type GetLoggedInUserResponse = User
66

7-
/*
8-
path: '/v1/auth/sign-up'
9-
POST: 회원가입
7+
/**
8+
- path: '/v1/auth/sign-up'
9+
- POST: 회원가입
1010
*/
1111
export interface SignUpRequest {
1212
email: Email // 이메일
@@ -18,9 +18,9 @@ export interface SignUpResponse extends User {
1818
gitHub: GitHub // GitHub 계정 URL
1919
}
2020

21-
/*
22-
path: '/v1/auth/sign-in'
23-
POST: 로그인
21+
/**
22+
- path: '/v1/auth/sign-in'
23+
- POST: 로그인
2424
*/
2525
export interface SignInRequest {
2626
email: Email // 이메일
@@ -32,9 +32,9 @@ export interface SignInResponse extends User {
3232
refreshToken: Token // 리프레시 토큰
3333
}
3434

35-
/*
36-
path: '/v1/auth/new-token'
37-
POST: 액세스 토큰 재발급
35+
/**
36+
- path: '/v1/auth/new-token'
37+
- POST: 액세스 토큰 재발급
3838
*/
3939
export interface RefreshTokenRequest {
4040
oldAccessToken: Token // 기존의 access token
@@ -44,28 +44,11 @@ export interface AccessTokenResponse {
4444
accessToken: Token // 신규 access token
4545
}
4646

47-
/*
48-
path: '/v1/auth/check-email'
49-
POST: 이메일 중복 체크
47+
/**
48+
- path: '/v1/auth/check-email'
49+
- POST: 이메일 중복 체크
5050
*/
5151
export interface CheckEmailRequest {
5252
email: Email // 검사하고자 하는 이메일
5353
}
5454
export type CheckEmailResponse = boolean
55-
56-
/*
57-
path: '/v1/my-page/password'
58-
PATCH: 마이 페이지 비밀번호 수정
59-
*/
60-
export interface PasswordUpdateRequest {
61-
password: Password // 새 비밀번호
62-
}
63-
64-
/*
65-
PasswordUpdateResponse
66-
{
67-
"isSuccess": true,
68-
"code": "COMMON200",
69-
"message": "비밀번호 수정이 완료되었습니다."
70-
}
71-
*/
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,47 +22,47 @@ interface CommunityDetail extends CommunityListItem {
2222
isComment: boolean // 댓글 허용 여부
2323
}
2424

25-
/*
26-
path: '/v1/community'
27-
GET: 커뮤니티 글 전체 조회
25+
/**
26+
- path: '/v1/community'
27+
- GET: 커뮤니티 글 전체 조회
2828
*/
2929
export type GetCommunityListResponse = CommunityListItem[]
30-
/*
31-
POST: 커뮤니티 글 등록
30+
/**
31+
- POST: 커뮤니티 글 등록
3232
*/
33-
export interface CommunityCreateRequest extends CommunityBase {
33+
export interface CreateCommunityRequest extends CommunityBase {
3434
isComment?: boolean // 댓글 허용 여부
3535
}
36-
export interface CommunityCreateResponse extends CommunityBase, TimeStamps {
36+
export interface CreateCommunityResponse extends CommunityBase, TimeStamps {
3737
id: Id // 생성된 커뮤니티 글 ID
3838
member: Id // 작성자 Id
3939
isComment: boolean // 댓글 허용 여부
4040
}
4141

42-
/*
43-
path: '/v1/community/{id}'
44-
GET: 커뮤니티 글 상세 조회
42+
/**
43+
- path: '/v1/community/{id}'
44+
- GET: 커뮤니티 글 상세 조회
4545
*/
4646
export type GetCommunityDetailResponse = CommunityDetail
4747

48-
/*
49-
PATCH: 커뮤니티 글 수정
48+
/**
49+
- PATCH: 커뮤니티 글 수정
5050
*/
51-
export type CommunityUpdateRequest = CommunityBase
52-
export type CommunityUpdateResponse = CommunityCreateResponse
51+
export type UpdateCommunityRequest = CommunityBase
52+
export type UpdateCommunityResponse = CreateCommunityResponse
5353

54-
/*
55-
DELETE: 커뮤니티 글 삭제
56-
반환 값: 기본 ApiResponse 구조 사용
54+
/**
55+
- DELETE: 커뮤니티 글 삭제
56+
- 반환 값: 기본 ApiResponse 구조 사용
5757
{
5858
"isSuccess": true,
5959
"code": "COMMON200",
6060
"message": "팀 모집글이 성공적으로 삭제되었습니다."
6161
}
6262
*/
6363

64-
/*
65-
path: '/v1/community/top5'
66-
GET: 좋아요 순으로 인기 커뮤니티 Top 5 유저 조회
64+
/**
65+
- path: '/v1/community/top5'
66+
- GET: 좋아요 순으로 인기 커뮤니티 Top 5 유저 조회
6767
*/
6868
export type GetCommunityTop5Response = CommunityTopMember[]

0 commit comments

Comments
 (0)