Some cleaning 😢
This commit is contained in:
19
server/posts/coin-info/index.js
Normal file
19
server/posts/coin-info/index.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var mail = require('../../lib/mail.js');
|
||||
var Log = require('../../lib/NodeLog.js');
|
||||
|
||||
module.exports.index = function(req, res) {
|
||||
|
||||
mail.send({
|
||||
from: req.body.name + " <" + req.body.name + "@toto.tata>",
|
||||
to: "Thomas <thomas.forgione@gmail.com>",
|
||||
subject: req.body.scene + " by " + req.body.name,
|
||||
text: JSON.stringify(req.body.coins)
|
||||
}, function(err, message) {
|
||||
if (err !== null) {
|
||||
Log.mailerror(err);
|
||||
}
|
||||
});
|
||||
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.send("");
|
||||
};
|
||||
3
server/posts/coin-info/urls.js
Normal file
3
server/posts/coin-info/urls.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/posts/coin-info': 'index'
|
||||
};
|
||||
Reference in New Issue
Block a user