parent
4370fef5d5
commit
03e1ef3271
|
@ -20,7 +20,12 @@ class AdminHashTagCurationService(
|
|||
) {
|
||||
@Transactional
|
||||
fun createContentHashTagCuration(request: CreateContentHashTagCurationRequest) {
|
||||
val isExists = repository.isExistsTag(tag = request.tag.trim())
|
||||
var tag = request.tag.trim()
|
||||
if (!tag.startsWith("#")) {
|
||||
tag = "#$tag"
|
||||
}
|
||||
|
||||
val isExists = repository.isExistsTag(tag = tag)
|
||||
|
||||
if (isExists) {
|
||||
throw SodaException("이미 등록된 태그 입니다.")
|
||||
|
@ -28,7 +33,7 @@ class AdminHashTagCurationService(
|
|||
|
||||
repository.save(
|
||||
ContentHashTagCuration(
|
||||
tag = request.tag,
|
||||
tag = tag,
|
||||
isAdult = request.isAdult
|
||||
)
|
||||
)
|
||||
|
@ -40,7 +45,12 @@ class AdminHashTagCurationService(
|
|||
?: throw SodaException("잘못된 요청입니다.")
|
||||
|
||||
if (request.tag != null) {
|
||||
hashTagCuration.tag = request.tag
|
||||
var tag = request.tag.trim()
|
||||
if (!tag.startsWith("#")) {
|
||||
tag = "#$tag"
|
||||
}
|
||||
|
||||
hashTagCuration.tag = tag
|
||||
}
|
||||
|
||||
if (request.isAdult != null) {
|
||||
|
|
Loading…
Reference in New Issue