Skip to content
This repository was archived by the owner on Jul 7, 2025. It is now read-only.

Commit 46a1d87

Browse files
authored
Merge pull request #126 from ASAP-Lettering/ASAP-426
ASAP-426 린트 반영
2 parents ac6d7fd + 20e1a02 commit 46a1d87

8 files changed

Lines changed: 91 additions & 81 deletions

File tree

Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/auth/api/AuthApi.kt

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import org.springframework.web.bind.annotation.RequestMapping
2020
@Tag(name = "Auth", description = "Auth API")
2121
@RequestMapping("/api/v1/auth")
2222
interface AuthApi {
23-
2423
@Operation(summary = "소셜 로그인")
2524
@PostMapping("/login/{provider}")
2625
@ApiResponses(
@@ -31,39 +30,38 @@ interface AuthApi {
3130
content = [
3231
Content(
3332
mediaType = "application/json",
34-
schema = Schema(implementation = SocialLoginResponse.Success::class)
35-
)
36-
]
33+
schema = Schema(implementation = SocialLoginResponse.Success::class),
34+
),
35+
],
3736
),
3837
ApiResponse(
3938
responseCode = "401",
4039
description = "신규 회원 가입 필요",
4140
content = [
4241
Content(
4342
mediaType = "application/json",
44-
schema = Schema(implementation = SocialLoginResponse.NonRegistered::class)
45-
)
46-
]
43+
schema = Schema(implementation = SocialLoginResponse.NonRegistered::class),
44+
),
45+
],
4746
),
4847
ApiResponse(
4948
responseCode = "4XX",
5049
description = "소셜 로그인 실패",
5150
content = [
5251
Content(
5352
mediaType = "application/json",
54-
schema = Schema(implementation = ExceptionResponse::class)
55-
)
56-
]
57-
)
58-
]
53+
schema = Schema(implementation = ExceptionResponse::class),
54+
),
55+
],
56+
),
57+
],
5958
)
6059
fun socialLogin(
61-
@Schema(description = "소셜 로그인 플랫폼, ex) KAKAO")
60+
@Schema(description = "소셜 로그인 플랫폼, ex) KAKAO, GOOGLE, NAVER")
6261
@PathVariable provider: String,
63-
@RequestBody request: SocialLoginRequest
62+
@RequestBody request: SocialLoginRequest,
6463
): ResponseEntity<SocialLoginResponse>
6564

66-
6765
@Operation(summary = "토큰 재발급")
6866
@PostMapping("/reissue")
6967
@ApiResponses(
@@ -74,23 +72,23 @@ interface AuthApi {
7472
content = [
7573
Content(
7674
mediaType = "application/json",
77-
schema = Schema(implementation = ReissueResponse::class)
78-
)
79-
]
75+
schema = Schema(implementation = ReissueResponse::class),
76+
),
77+
],
8078
),
8179
ApiResponse(
8280
responseCode = "4XX",
8381
description = "토큰 재발급 실패, 다시 로그인해야함",
8482
content = [
8583
Content(
8684
mediaType = "application/json",
87-
schema = Schema(implementation = ExceptionResponse::class)
88-
)
89-
]
85+
schema = Schema(implementation = ExceptionResponse::class),
86+
),
87+
],
9088
),
91-
]
89+
],
9290
)
9391
fun reissueToken(
94-
@RequestBody request: ReissueRequest
92+
@RequestBody request: ReissueRequest,
9593
): ReissueResponse
96-
}
94+
}

Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/auth/controller/AuthController.kt

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,44 @@ import org.springframework.web.bind.annotation.RestController
1414
@RestController
1515
class AuthController(
1616
private val socialLoginUsecase: SocialLoginUsecase,
17-
private val reissueTokenUsecase: ReissueTokenUsecase
17+
private val reissueTokenUsecase: ReissueTokenUsecase,
1818
) : AuthApi {
19-
2019
override fun socialLogin(
2120
provider: String,
22-
request: SocialLoginRequest
21+
request: SocialLoginRequest,
2322
): ResponseEntity<SocialLoginResponse> {
24-
val command = SocialLoginUsecase.Command(
25-
provider = provider,
26-
accessToken = request.accessToken
27-
)
23+
val command =
24+
SocialLoginUsecase.Command(
25+
provider = provider,
26+
accessToken = request.accessToken,
27+
)
2828
return when (val response = socialLoginUsecase.login(command)) {
29-
is SocialLoginUsecase.Success -> ResponseEntity.ok(
30-
SocialLoginResponse.Success(
31-
response.accessToken,
32-
response.refreshToken,
33-
response.isProcessedOnboarding
29+
is SocialLoginUsecase.Success ->
30+
ResponseEntity.ok(
31+
SocialLoginResponse.Success(
32+
response.accessToken,
33+
response.refreshToken,
34+
response.isProcessedOnboarding,
35+
),
3436
)
35-
)
3637

37-
is SocialLoginUsecase.NonRegistered -> ResponseEntity.status(HttpStatus.UNAUTHORIZED)
38-
.body(SocialLoginResponse.NonRegistered(response.registerToken))
38+
is SocialLoginUsecase.NonRegistered ->
39+
ResponseEntity
40+
.status(HttpStatus.UNAUTHORIZED)
41+
.body(SocialLoginResponse.NonRegistered(response.registerToken))
3942
}
4043
}
4144

4245
override fun reissueToken(request: ReissueRequest): ReissueResponse {
43-
val response = reissueTokenUsecase.reissue(
44-
ReissueTokenUsecase.Command(
45-
refreshToken = request.refreshToken
46+
val response =
47+
reissueTokenUsecase.reissue(
48+
ReissueTokenUsecase.Command(
49+
refreshToken = request.refreshToken,
50+
),
4651
)
47-
)
4852
return ReissueResponse(
4953
accessToken = response.accessToken,
50-
refreshToken = response.refreshToken
54+
refreshToken = response.refreshToken,
5155
)
5256
}
53-
}
57+
}

Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/image/api/ImageApi.kt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import org.springframework.web.multipart.MultipartFile
1515
@Tag(name = "Image", description = "Image API")
1616
@RequestMapping("/api/v1/images")
1717
interface ImageApi {
18-
1918
@Operation(
2019
summary = "이미지 업로드",
2120
description = "이미지를 업로드합니다.",
@@ -30,18 +29,18 @@ interface ImageApi {
3029
Header(
3130
name = "Authorization",
3231
description = "액세스 토큰",
33-
required = true
34-
)
35-
]
32+
required = true,
33+
),
34+
],
3635
),
3736
ApiResponse(
3837
responseCode = "4XX",
39-
description = "이미지 업로드 실패"
40-
)
41-
]
38+
description = "이미지 업로드 실패",
39+
),
40+
],
4241
)
4342
fun uploadImage(
4443
@RequestPart image: MultipartFile,
45-
@AccessUser userId: String
44+
@AccessUser userId: String,
4645
): UploadImageResponse
47-
}
46+
}

Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/image/controller/ImageController.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ import org.springframework.web.multipart.MultipartFile
1010
@RestController
1111
class ImageController(
1212
private val uploadImageUsecase: UploadImageUsecase,
13-
private val fileConverter: FileConverter
14-
): ImageApi {
15-
13+
private val fileConverter: FileConverter,
14+
) : ImageApi {
1615
override fun uploadImage(
1716
image: MultipartFile,
18-
userId: String
17+
userId: String,
1918
): UploadImageResponse {
20-
val response = uploadImageUsecase.upload(
21-
UploadImageUsecase.Command(
22-
image = fileConverter.convert(image),
23-
userId = userId
19+
val response =
20+
uploadImageUsecase.upload(
21+
UploadImageUsecase.Command(
22+
image = fileConverter.convert(image),
23+
userId = userId,
24+
),
2425
)
25-
)
2626
return UploadImageResponse(
27-
imageUrl = response.imageUrl
27+
imageUrl = response.imageUrl,
2828
)
2929
}
30-
}
30+
}

Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/letter/controller/DraftLetterController.kt

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DraftLetterController(
4242
override fun updatePhysicalDraft(
4343
draftId: String,
4444
userId: String,
45-
request: UpdatePhysicalDraftLetterRequest
45+
request: UpdatePhysicalDraftLetterRequest,
4646
) {
4747
updateDraftLetterUsecase.command(
4848
UpdateDraftLetterUsecase.Command.Physical(
@@ -75,14 +75,15 @@ class DraftLetterController(
7575
override fun getAllPhysicalDrafts(userId: String): GetAllPhysicalDraftLetterResponse {
7676
val response = getPhysicalDraftLetterUsecase.getAll(GetPhysicalDraftLetterUsecase.Query.All(userId))
7777
return GetAllPhysicalDraftLetterResponse(
78-
drafts = response.drafts.map {
79-
PhysicalDraftLetterInfo(
80-
draftKey = it.draftKey,
81-
senderName = it.senderName,
82-
content = it.content,
83-
lastUpdated = it.lastUpdated,
84-
)
85-
}
78+
drafts =
79+
response.drafts.map {
80+
PhysicalDraftLetterInfo(
81+
draftKey = it.draftKey,
82+
senderName = it.senderName,
83+
content = it.content,
84+
lastUpdated = it.lastUpdated,
85+
)
86+
},
8687
)
8788
}
8889

@@ -107,7 +108,7 @@ class DraftLetterController(
107108

108109
override fun getPhysicalDraftLetter(
109110
draftKey: String,
110-
userId: String
111+
userId: String,
111112
): GetPhysicalDraftLetterResponse {
112113
val response = getPhysicalDraftLetterUsecase.getByKey(GetPhysicalDraftLetterUsecase.Query.ByKey(draftKey, userId))
113114
return GetPhysicalDraftLetterResponse(
@@ -140,7 +141,10 @@ class DraftLetterController(
140141
)
141142
}
142143

143-
override fun deletePhysicalDraft(draftId: String, userId: String) {
144+
override fun deletePhysicalDraft(
145+
draftId: String,
146+
userId: String,
147+
) {
144148
removeDraftLetterUsecase.deleteBy(
145149
RemoveDraftLetterUsecase.Command.Physical(
146150
draftId = draftId,

Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/space/controller/SpaceController.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ class SpaceController(
9191
)
9292
}
9393

94-
override fun updateSpaceMain(spaceId: String, userId: String) {
94+
override fun updateSpaceMain(
95+
spaceId: String,
96+
userId: String,
97+
) {
9598
updateSpaceUsecase.update(
9699
UpdateSpaceUsecase.Command.Main(
97100
userId = userId,

Bootstrap-Module/src/main/kotlin/com/asap/bootstrap/web/user/controller/UserController.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ class UserController(
4040
)
4141
}
4242

43-
override fun deleteUser(userId: String, request: UnregisterUserRequest?) {
43+
override fun deleteUser(
44+
userId: String,
45+
request: UnregisterUserRequest?,
46+
) {
4447
deleteUserUsecase.delete(
4548
DeleteUserUsecase.Command(
4649
userId = userId,

Infrastructure-Module/Persistence/src/main/kotlin/com/asap/persistence/jpa/letter/entity/ReceiveDraftLetterEntity.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import java.time.LocalDateTime
1010

1111
@Entity
1212
@Table(
13-
name = "receive_draft_letters"
13+
name = "receive_draft_letters",
1414
)
1515
class ReceiveDraftLetterEntity(
1616
id: String,
@@ -59,5 +59,4 @@ class ReceiveDraftLetterEntity(
5959
columnDefinition = "VARCHAR(20)",
6060
)
6161
var type: ReceiveDraftLetterType = type
62-
63-
}
62+
}

0 commit comments

Comments
 (0)