diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-06-14 07:15:52 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-06-14 07:15:52 +0300 |
commit | 3736241cb07eb47c7ceed5fc38cb43633bb0ab4c (patch) | |
tree | 91131a6b5b04df363486fc9c265b42829377bd40 /api/routes/announceZChain/index.js | |
parent | b672f3904c2e17833ff5745bdbc16a8f351ff517 (diff) | |
download | arching-kaos-tools-3736241cb07eb47c7ceed5fc38cb43633bb0ab4c.tar.gz arching-kaos-tools-3736241cb07eb47c7ceed5fc38cb43633bb0ab4c.tar.bz2 arching-kaos-tools-3736241cb07eb47c7ceed5fc38cb43633bb0ab4c.zip |
Refactoring
Diffstat (limited to 'api/routes/announceZChain/index.js')
-rw-r--r-- | api/routes/announceZChain/index.js | 6 |
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"})); } } |