Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tag api request에서 누락된 field 추가(createdAt & updatedAt) #84

Merged
merged 5 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ sealed class TagRequest {
val id: UUID,
val name: String,
val colorHex: String,
val embeddingVector: List<Float>
val embeddingVector: List<Float>,
val createdAt: Instant,
val updatedAt: Instant?
) : TagResponse()
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import com.wafflestudio.toyproject.memoWithTags.tag.persistence.TagRepository
import com.wafflestudio.toyproject.memoWithTags.user.controller.User
import com.wafflestudio.toyproject.memoWithTags.user.persistence.UserRepository
import org.springframework.stereotype.Service
import java.time.Instant
import java.util.UUID

@Service
Expand Down Expand Up @@ -53,7 +52,7 @@ class TagService(
tagEntity.name = request.name
tagEntity.colorHex = request.colorHex
tagEntity.embeddingVector = Tag.convertEmbeddingVectorToString(request.embeddingVector)
tagEntity.updatedAt = Instant.now()
tagEntity.updatedAt = request.updatedAt
val savedTagEntity = tagRepository.save(tagEntity)
return Tag(
savedTagEntity.id,
Expand Down