diff --git a/frontend/pages/ManageControlsPage/MacOSSettings/cards/DiskEncryption/DiskEncryption.tsx b/frontend/pages/ManageControlsPage/MacOSSettings/cards/DiskEncryption/DiskEncryption.tsx index 8dca6a83e..8b5cc2e6b 100644 --- a/frontend/pages/ManageControlsPage/MacOSSettings/cards/DiskEncryption/DiskEncryption.tsx +++ b/frontend/pages/ManageControlsPage/MacOSSettings/cards/DiskEncryption/DiskEncryption.tsx @@ -77,7 +77,8 @@ const DiskEncryption = ({ currentTeamId }: IDiskEncryptionProps) => { ) : ( <> - {showAggregate ? ( + {/* remove && false to show the table once the API is finished */} + {showAggregate && false ? ( ) : null} { - const { MDM_UPDATE_APPLE_SETTINGS } = endpoints; - - return sendRequest("PATCH", MDM_UPDATE_APPLE_SETTINGS, { + const { + MDM_UPDATE_APPLE_SETTINGS: teamsEndpoint, + CONFIG: noTeamsEndpoint, + } = endpoints; + if (teamId === 0) { + return sendRequest("PATCH", noTeamsEndpoint, { + mdm: { + macos_settings: { enable_disk_encryption: enableDiskEncryption }, + }, + }); + } + return sendRequest("PATCH", teamsEndpoint, { enable_disk_encryption: enableDiskEncryption, team_id: teamId, });