Skip to content

Commit

Permalink
delete :: format fun
Browse files Browse the repository at this point in the history
  • Loading branch information
meltapplee committed Sep 10, 2024
1 parent e541240 commit 09619b3
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import org.meogo.domain.post.domain.PostRepository
import org.meogo.domain.post.present.dto.response.PostResponse
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter

@Service
class QueryAllPostService(
Expand All @@ -22,13 +20,10 @@ class QueryAllPostService(
name = "익명",
title = post.title,
content = post.content,
date = format(post.date),
date = post.format(post.date),
keyWord = post.keyWord?.split(",")?.map { it.trim() },
schoolId = post.schoolId
)
}.sortedBy { it.id }
}

private fun format(date: LocalDateTime) =
date.format(DateTimeFormatter.ofPattern("yy.MM.dd HH:mm"))
}

0 comments on commit 09619b3

Please sign in to comment.