aboutsummaryrefslogtreecommitdiff
path: root/api/routes/announceZChain/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'api/routes/announceZChain/index.js')
-rw-r--r--api/routes/announceZChain/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/api/routes/announceZChain/index.js b/api/routes/announceZChain/index.js
index a1b336c..0261aa4 100644
--- a/api/routes/announceZChain/index.js
+++ b/api/routes/announceZChain/index.js
@@ -22,9 +22,11 @@ module.exports = (req, res) => {
if (regex.test(zchain)){
getNSvalidity(zchain,res);
} else {
- res.send({error:"Invalid data"});
+ res.writeHead(404, { 'Content-Type': 'application/json'});
+ res.end(JSON.stringify({error:"Invalid data"}));
}
} else {
- res.send({error:"Invalid data"});
+ res.writeHead(404, { 'Content-Type': 'application/json'});
+ res.end(JSON.stringify({error:"Invalid data"}));
}
}