aboutsummaryrefslogtreecommitdiff
path: root/api/routes/getLeaf
diff options
context:
space:
mode:
Diffstat (limited to 'api/routes/getLeaf')
-rw-r--r--api/routes/getLeaf/index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/routes/getLeaf/index.js b/api/routes/getLeaf/index.js
index 54df1e0..8855712 100644
--- a/api/routes/getLeaf/index.js
+++ b/api/routes/getLeaf/index.js
@@ -21,6 +21,11 @@ module.exports = (req, res) => {
res.writeHead(200, {'Content-Type': 'application/json'});
res.end(fs.readFileSync(path));
}
+ else
+ {
+ res.writeHead(404, {'Content-Type': 'application/json'});
+ res.end(JSON.stringify({"error":"not found"}));
+ }
}
catch (error)
{