diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-06-17 02:48:36 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-06-17 02:48:36 +0300 |
commit | 77c9edf809cac2e9577e1b9de5236fd6de6be578 (patch) | |
tree | 14d995609699f9b839ae53a3b046cdad638d324c /api/index.js | |
parent | 01ff1c0a97cd36e69e21bac0776bef21be7ae374 (diff) | |
download | arching-kaos-tools-77c9edf809cac2e9577e1b9de5236fd6de6be578.tar.gz arching-kaos-tools-77c9edf809cac2e9577e1b9de5236fd6de6be578.tar.bz2 arching-kaos-tools-77c9edf809cac2e9577e1b9de5236fd6de6be578.zip |
API: Error response errno -> error
Diffstat (limited to 'api/index.js')
-rwxr-xr-x | api/index.js | 12 |
1 files changed, 6 insertions, 6 deletions
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"}); } }); |