Return only property code in code lookup
All checks were successful
build-and-deploy / build-deploy (push) Successful in 34s

This commit is contained in:
androidlover5842
2026-02-01 23:05:22 +05:30
parent 36b2d04de4
commit 4bcac9cb6a
2 changed files with 1 additions and 2 deletions

View File

@@ -39,7 +39,6 @@ data class PropertyResponse(
) )
data class PropertyCodeResponse( data class PropertyCodeResponse(
val propertyId: UUID,
val code: String val code: String
) )

View File

@@ -104,7 +104,7 @@ class Properties(
val property = propertyRepo.findById(propertyId).orElseThrow { val property = propertyRepo.findById(propertyId).orElseThrow {
ResponseStatusException(HttpStatus.NOT_FOUND, "Property not found") ResponseStatusException(HttpStatus.NOT_FOUND, "Property not found")
} }
return PropertyCodeResponse(propertyId = property.id!!, code = property.code) return PropertyCodeResponse(code = property.code)
} }
@GetMapping("/properties/{propertyId}/users") @GetMapping("/properties/{propertyId}/users")