Skip to content

Commit

Permalink
♻️ :: code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
lyutvs committed May 24, 2023
1 parent e79f76c commit e00ac46
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.v1servicenotification.setting.spi

import io.github.v1servicenotification.category.Category
import java.util.*

interface SettingCategorySpi {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ class CustomSettingRepositoryImpl(
}
}

private fun setSettingIsActivate(categoryIds: List<UUID>, userId: UUID, isActivated: Boolean) {
categoryIds.forEach {
jpaQueryFactory
.update(settingEntity)
.set(settingEntity.isActivated, isActivated)
.where(
settingEntity.settingId.categoryEntity.id.eq(it)
.and(settingEntity.settingId.userId.eq(userId))
)
}
}

override fun settingExist(categoryIds: List<UUID>, userId: UUID): Boolean {
return getSettingIdList(categoryIds, userId).map { settingId ->
settingRepository.existsById(settingId)
Expand Down

0 comments on commit e00ac46

Please sign in to comment.