Add get guest by id endpoint
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s

This commit is contained in:
androidlover5842
2026-01-29 09:14:10 +05:30
parent 7aecc5c706
commit c27d941252

View File

@@ -93,6 +93,17 @@ class Guests(
return guests.toResponse(propertyId, guestVehicleRepo, guestRatingRepo)
}
@GetMapping("/{guestId}")
fun getGuest(
@PathVariable propertyId: UUID,
@PathVariable guestId: UUID,
@AuthenticationPrincipal principal: MyPrincipal?
): GuestResponse {
requireMember(propertyAccess, propertyId, principal)
val (_, guest) = requirePropertyGuest(propertyRepo, guestRepo, propertyId, guestId)
return setOf(guest).toResponse(propertyId, guestVehicleRepo, guestRatingRepo).first()
}
@PostMapping("/{guestId}/vehicles")
@ResponseStatus(HttpStatus.CREATED)
fun addVehicle(