Skip to content

Commit

Permalink
fix: InocluationSimple 조회에 type 기준을 되돌리자
Browse files Browse the repository at this point in the history
  • Loading branch information
HyungJu committed May 14, 2024
1 parent f5bec5a commit 1549b90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ class InoculationService(
): List<InoculationSimpleResponse> {
val vaccinations =
if (request.vaccinations.isEmpty()) {
vaccinationRepository.findAll()
vaccinationRepository.findAll().filter {
it.vaccinationType == request.type
}
} else {
vaccinationRepository.findAll().filter {
it.vaccineName in request.vaccinations
it.vaccineName in request.vaccinations && it.vaccinationType == request.type
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.vacgom.backend.inoculation.presentation.dto

import com.vacgom.backend.inoculation.domain.constants.VaccinationType

data class InoculationSimpleRequest(
val type: VaccinationType,
val vaccinations: List<String>,
)

0 comments on commit 1549b90

Please sign in to comment.