|
|
@ -95,9 +95,10 @@ public class UsersController { |
|
|
|
|
|
|
|
// Endpoint to get all organizations |
|
|
|
@GetMapping("/all") |
|
|
|
@PreAuthorize("hasRole('ROLE_ADMIN')") |
|
|
|
public ResponseEntity<List<EduCemadenOrganizations>> getAllOrganizations() { |
|
|
|
List<EduCemadenOrganizations> organizations = organizationsService.getAllOrganizations(); |
|
|
|
// Remover o campo 'phone' de cada organização |
|
|
|
organizations.forEach(org -> org.setPhone(null)); |
|
|
|
return new ResponseEntity<>(organizations, HttpStatus.OK); |
|
|
|
} |
|
|
|
|
|
|
|