Last active
June 28, 2020 09:14
-
-
Save hw0k/89a9e5676d111c1e1be2026e79e18fc9 to your computer and use it in GitHub Desktop.
FND 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function sendNotifications() { | |
const preferences = await UserPreferencesRepository.findAll(); | |
preferences | |
.filter(isPreferenceHasAllowedNotification) | |
.forEach(NotificationModule.send); | |
} | |
function isPreferenceHasAllowedNotification(preference) { | |
return preference.hasAllowedNotification; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment