diff --git a/app/src/main/kotlin/io/sakurasou/service/strategy/StrategyServiceImpl.kt b/app/src/main/kotlin/io/sakurasou/service/strategy/StrategyServiceImpl.kt index 93ba5709..cb0dd844 100644 --- a/app/src/main/kotlin/io/sakurasou/service/strategy/StrategyServiceImpl.kt +++ b/app/src/main/kotlin/io/sakurasou/service/strategy/StrategyServiceImpl.kt @@ -15,6 +15,8 @@ import io.sakurasou.model.dao.group.GroupDao import io.sakurasou.model.dao.strategy.StrategyDao import io.sakurasou.model.dto.StrategyInsertDTO import io.sakurasou.model.dto.StrategyUpdateDTO +import io.sakurasou.model.strategy.LocalStrategy +import io.sakurasou.model.strategy.S3Strategy import kotlinx.datetime.Clock import kotlinx.datetime.TimeZone import kotlinx.datetime.toLocalDateTime @@ -80,7 +82,12 @@ class StrategyServiceImpl( val strategyVO = StrategyVO( id = strategy.id, name = strategy.name, - config = strategy.config, + config = strategy.config.let { + when (it) { + is LocalStrategy -> it + is S3Strategy -> it.copy(accessKey = "", secretKey = "") + } + }, // type = strategy.config::class.annotations.filterIsInstance().firstOrNull()?.value!!, type = strategy.config.strategyType, createTime = strategy.createTime