salix/services/mailer/application/route/manuscript.js

26 lines
808 B
JavaScript
Raw Normal View History

2017-05-30 06:06:14 +00:00
var express = require('express');
var router = new express.Router();
var mail = require('../mail.js');
// Payment method changes
router.post('/payment-update/:clientId', function(request, response, next) {
mail.sendWithTemplate('payment-update', {recipient: request.params.clientId}, error => {
if (error)
return response.status(400).json({message: error.message});
return response.json();
});
});
// Printer setup
router.post('/printer-setup/:clientId', function(request, response, next) {
mail.sendWithTemplate('printer-setup', {recipient: request.params.clientId}, error => {
if (error)
return response.status(400).json({message: error.message});
return response.json();
2017-05-30 06:06:14 +00:00
});
});
module.exports = router;