aboutsummaryrefslogtreecommitdiff
path: root/api/index.js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-06-17 02:48:36 +0300
committerkaotisk <kaotisk@arching-kaos.org>2023-06-17 02:48:36 +0300
commit77c9edf809cac2e9577e1b9de5236fd6de6be578 (patch)
tree14d995609699f9b839ae53a3b046cdad638d324c /api/index.js
parent01ff1c0a97cd36e69e21bac0776bef21be7ae374 (diff)
downloadarching-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-xapi/index.js12
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"});
}
});