Skip to content

Commit

Permalink
chore(example): update add to whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
tompsota committed Oct 23, 2024
1 parent 91ca6b9 commit 5766f22
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions example/src/pages/FreeRaspDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ const FreeRaspDemo: React.FC<{

const addItemsToMalwareWhitelist = async () => {
const appsToWhitelist = ['io.ionic.starter', 'com.example.myApp'];
appsToWhitelist.forEach(async app => {
try {
const whitelistResponse = await addToWhitelist(app);
console.info(
`${app} stored to Malware Whitelist: ${whitelistResponse}`,
);
} catch (error: any) {
console.info('Malware whitelist failed: ', error);
}
});
await Promise.all(
appsToWhitelist.map(async app => {
try {
const whitelistResponse = await addToWhitelist(app);
console.info(
`${app} stored to Malware Whitelist: ${whitelistResponse}`,
);
} catch (error) {
console.info('Malware whitelist failed: ', error);
}
}),
);
};

return (
Expand Down

0 comments on commit 5766f22

Please sign in to comment.