Merge pull request '콘텐츠 등록 - 태그 등록' (#116) from test into main

Reviewed-on: #116
This commit is contained in:
klaus 2024-01-16 15:19:59 +00:00
commit 8aa79c4a9c
1 changed files with 2 additions and 1 deletions

View File

@ -198,10 +198,11 @@ class AudioContentService(
// 태그 분리, #추가, 등록 // 태그 분리, #추가, 등록
if (request.tags.isNotBlank()) { if (request.tags.isNotBlank()) {
val tags = request.tags val tags = request.tags
.replace("#", " #")
.split(" ") .split(" ")
.asSequence() .asSequence()
.map { it.trim() } .map { it.trim() }
.filter { it.isNotEmpty() } .filter { it.isNotBlank() }
.map { .map {
val tag = if (!it.startsWith("#")) { val tag = if (!it.startsWith("#")) {
"#$it" "#$it"