Skip to content

Commit

Permalink
Remove useless vessel resolution from GetPriorNotifications use case …
Browse files Browse the repository at this point in the history
…in Backend
  • Loading branch information
ivangabriele committed Mar 21, 2024
1 parent 1c67b42 commit 215f7d9
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ class GetPriorNotifications(
private val logbookReportRepository: LogbookReportRepository,
private val portRepository: PortRepository,
private val reportingRepository: ReportingRepository,
private val vesselRepository: VesselRepository,
) {
fun execute(filter: LogbookReportFilter): List<PriorNotification> {
val priorNotifications =
Expand All @@ -39,10 +38,8 @@ class GetPriorNotifications(
}
}

val vessel = vesselRepository.findVesselById(priorNotification.vesselId)

val reportingsCount =
vessel?.id?.let { vesselId ->
priorNotification.vesselId.let { vesselId ->
reportingRepository.findCurrentAndArchivedByVesselIdEquals(
vesselId,
// TODO Fix that.
Expand Down

0 comments on commit 215f7d9

Please sign in to comment.