Skip to content

Instantly share code, notes, and snippets.

@andidp
Created January 23, 2020 06:26
Show Gist options
  • Save andidp/776fc19cca7103dd83ab523bae9a7158 to your computer and use it in GitHub Desktop.
Save andidp/776fc19cca7103dd83ab523bae9a7158 to your computer and use it in GitHub Desktop.
Routing Email Template
app.get('/v1/email_templates/:lang', UPLOAD_CONFIG.common, (req, res) => {
if (req.auth !== false) {
emailTemplate.getEmailTemplates(req, response => logSentResponse(req, res, response));
}
});
app.get('/v1/email_templates/:name/:lang', UPLOAD_CONFIG.common, (req, res) => {
if (req.auth !== false) {
emailTemplate.getEmailTemplate(req, response => logSentResponse(req, res, response));
}
});
app.get('/v1/email_templates', UPLOAD_CONFIG.common, (req, res) => {
if (req.auth !== false) {
emailTemplate.getEmailTemplate(req, response => logSentResponse(req, res, response));
}
});
app.post('/v1/email_templates/sync_redis', UPLOAD_CONFIG.common, (req, res) => {
if (req.auth !== false) {
emailTemplate.syncData(req, response => logSentResponse(req, res, response));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment