From 77c9edf809cac2e9577e1b9de5236fd6de6be578 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 17 Jun 2023 02:48:36 +0300 Subject: API: Error response errno -> error --- api/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'api/index.js') diff --git a/api/index.js b/api/index.js index cb6006a..d9f243f 100755 --- a/api/index.js +++ b/api/index.js @@ -103,7 +103,7 @@ app.use('/', routes); * of the application that run the test. * * Returns: - * - errno on failure + * - error on failure * - on success we process with addNSEntriesToFile() * */ @@ -115,7 +115,7 @@ function continuethingsNS(validitycode,sh,res,gotit){ }; addNSEntriesToFile(entry,res); } else { - res.send({errno:"Invalid data"}); + res.send({error:"Invalid data"}); } } @@ -124,7 +124,7 @@ function continuethingsNS(validitycode,sh,res,gotit){ * of the application that run the test. * * Returns : - * - errno on failure + * - error on failure * - on success we process with addEntriesToFile() * */ @@ -133,7 +133,7 @@ function continuethings(exitcode,sh,res){ var entry = {zblock:sh}; addEntriesToFile(entry,res); } else { - res.send({errno:"Invalid data"}); + res.send({error:"Invalid data"}); } } @@ -156,7 +156,7 @@ function addNSEntriesToFile(entry,res){ data.forEach(a=>{ if ( a.zchain === entry.zchain && a.latest=== entry.latest ){ duplicate_entry = 1; - res.send({errno:"already there"}); + res.send({error:"already there"}); } }); @@ -200,7 +200,7 @@ function addEntriesToFile(entry,res){ data.forEach(a=>{ if ( a.zblock === entry.zblock ){ duplicate_entry = 1; - res.send({errno:"already there"}); + res.send({error:"already there"}); } }); -- cgit v1.2.3