Allow public room types list
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s
This commit is contained in:
@@ -40,8 +40,9 @@ class RoomTypes(
|
||||
@PathVariable propertyId: UUID,
|
||||
@AuthenticationPrincipal principal: MyPrincipal?
|
||||
): List<RoomTypeResponse> {
|
||||
requirePrincipal(principal)
|
||||
propertyAccess.requireMember(propertyId, principal!!.userId)
|
||||
if (principal != null) {
|
||||
propertyAccess.requireMember(propertyId, principal.userId)
|
||||
}
|
||||
return roomTypeRepo.findByPropertyIdOrderByCode(propertyId).map { it.toResponse() }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user