diff --git a/Dockerfile b/backend/Dockerfile similarity index 100% rename from Dockerfile rename to backend/Dockerfile diff --git a/backend/src/main/kotlin/io/github/devcavin/backend/service/DashboardService.kt b/backend/src/main/kotlin/io/github/devcavin/backend/service/DashboardService.kt index a99df41..a1f091a 100644 --- a/backend/src/main/kotlin/io/github/devcavin/backend/service/DashboardService.kt +++ b/backend/src/main/kotlin/io/github/devcavin/backend/service/DashboardService.kt @@ -63,7 +63,7 @@ class DashboardService( siteId = siteId, visitStatus = checkedInStatus, pageable = PageRequest.of(0, 10, - Sort.by(Sort.Direction.DESC, "checkoutTime")) + Sort.by(Sort.Direction.DESC, "checkInTime")) ).content.map { it.toResponse() } val overdueVisitors = visitorRepository.findAllOverdue( @@ -75,7 +75,7 @@ class DashboardService( siteId = siteId, visitStatus = checkedOutStatus, pageable = PageRequest.of(0, 10, - Sort.by(Sort.Direction.DESC, "checkoutTime")) + Sort.by(Sort.Direction.DESC, "checkOutTime")) ).content.map { it.toResponse() } return DashboardFeed( diff --git a/backend/src/main/kotlin/io/github/devcavin/backend/service/ZoneService.kt b/backend/src/main/kotlin/io/github/devcavin/backend/service/ZoneService.kt index 107db4c..0e9da3b 100644 --- a/backend/src/main/kotlin/io/github/devcavin/backend/service/ZoneService.kt +++ b/backend/src/main/kotlin/io/github/devcavin/backend/service/ZoneService.kt @@ -22,7 +22,7 @@ class ZoneService( val site = siteRepository.findById(siteId) .orElseThrow { ResourceNotFoundException("Site", siteId) } - if (!zoneRepository.existsBySiteIdAndName(siteId, request.name)) { + if (zoneRepository.existsBySiteIdAndName(siteId, request.name)) { throw ConflictException("Zone with this name already exists under this site") }