Skip to content

Commit

Permalink
Merge pull request #414 from GSM-MSG/develop
Browse files Browse the repository at this point in the history
๐Ÿ” master ๋ธŒ๋žœ์น˜์— ๋จธ์ง€
  • Loading branch information
enbraining authored Sep 26, 2024
2 parents f298b62 + 871482b commit 324b83f
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import team.msg.sms.domain.authentication.service.*
import team.msg.sms.domain.file.dto.res.FileResponseData
import team.msg.sms.domain.file.service.FileService
import java.util.*
import kotlin.math.max

@UseCase
class QueryAuthenticationFormUseCase(
Expand All @@ -25,7 +24,15 @@ class QueryAuthenticationFormUseCase(
) {
@Transactional(readOnly = true)
fun execute(): QueryAuthenticationFormResponseData {
val authenticationFormId = authenticationFormService.getActiveAuthenticationFormId()
val authenticationFormId = runCatching {
authenticationFormService.getActiveAuthenticationFormId()
}.getOrNull()

authenticationFormId ?: return QueryAuthenticationFormResponseData(
files = emptyList(),
content = emptyList()
)

val files = fetchFiles(authenticationFormId)
val groups = fetchAuthenticationGroups(authenticationFormId)
val authenticationSections = fetchAuthenticationSections(groups)
Expand Down

0 comments on commit 324b83f

Please sign in to comment.