Created
April 3, 2019 21:44
-
-
Save zeyneloz/66765bd9b8f4cfb5196c0d1e5febf5a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
exports.handler = async (event) => { | |
const notes = await getNotes(user.id); // Fetch user notes from database. | |
const translatedNotes = await translate(notes, event.translateTo); // Translate notes to target language. | |
await sendMail(user.email, "Your notes", translatedNotes); // Send translated notes to user. | |
return { message: "You will receive the email soon" }; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment