Skip to content

Commit

Permalink
Feat :: cleaned unnecessary classes, codes
Browse files Browse the repository at this point in the history
Change MutableList to (Immutable)List
 - Anyway the list is not changing at all.
Remove Duplicated Response.kt
  • Loading branch information
jombidev committed Apr 12, 2024
1 parent 5978173 commit 806fb1b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AuthController(
@PostMapping("/sign-in")
suspend fun signIn(
@RequestParam("code") @Valid code: String
) = ResponseData.ok("로그인 성공",authService.signIn(code))
) = ResponseData.ok("로그인 성공", authService.signIn(code))

@PostMapping("/reissue")
fun reissue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ data class ErrorResponseEntity(
.body(
ErrorResponseEntity(
status = e.getHttpStatus().value(),
code = e.getExceptionName()!!,
message = e.getMessage()!!
code = e.getExceptionName(),
message = e.getMessage()
)
)
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.molohala.infinitycore.community.application.dto.res

import com.querydsl.core.annotations.QueryProjection
import java.time.LocalDateTime

data class CommunityListRes(
data class CommunityListRes @QueryProjection constructor(
val communityId: Long,
val content: String,
val createdAt: LocalDateTime,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CommunityService(
)
}

fun getList(page: PageRequest): MutableList<CommunityListRes> {
fun getList(page: PageRequest): List<CommunityListRes> {
return queryCommunityRepository.findWithPagination(page)
}
fun getById(id: Long) = queryCommunityRepository.findById(id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import com.molohala.infinitycore.common.PageRequest
import com.molohala.infinitycore.community.application.dto.res.CommunityListRes

interface QueryCommunityRepository {
fun findWithPagination(pageRequest: PageRequest):MutableList<CommunityListRes>
fun findWithPagination(pageRequest: PageRequest):List<CommunityListRes>
fun findById(id: Long): CommunityListRes?
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class QueryDslCommunityRepository(
val query: JPAQuery<Community> = queryFactory.select(community)
.from(community)

override fun findWithPagination(pageRequest: PageRequest): MutableList<CommunityListRes> {
override fun findWithPagination(pageRequest: PageRequest): List<CommunityListRes> {
return queryFactory
.select(communityRes())
.from(community)
Expand Down

0 comments on commit 806fb1b

Please sign in to comment.