Convert all remaining tabs by 2spaces
[vchess.git] / server / routes / messages.js
index b3c158e..cd93b9f 100644 (file)
@@ -6,19 +6,19 @@ const params = require(__dirname.replace("/routes", "/config/parameters"));
 
 // Send a message through contact form
 router.post("/messages", (req,res,next) => {
-       if (!req.xhr)
-               return res.json({errmsg: "Unauthorized access"});
+  if (!req.xhr)
+    return res.json({errmsg: "Unauthorized access"});
   const from = req.body["email"];
-       const subject = req.body["subject"];
-       const body = req.body["content"];
+  const subject = req.body["subject"];
+  const body = req.body["content"];
 
-       // TODO: sanitize ?
-       mailer(from, params.mail.contact, subject, body, err => {
-               if (!!err)
-                       return res.json({errmsg:err});
-               // OK, everything fine
-               res.json({}); //ignored
-       });
+  // TODO: sanitize ?
+  mailer(from, params.mail.contact, subject, body, err => {
+    if (!!err)
+      return res.json({errmsg:err});
+    // OK, everything fine
+    res.json({}); //ignored
+  });
 });
 
 module.exports = router;