Add get guest by id endpoint
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user