aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-12-13 15:46:45 +0200
committerkaotisk <kaotisk@arching-kaos.org>2024-12-13 15:46:45 +0200
commitde38fcf7bfbb5b8ba70e54621cb69f0b3aeba65c (patch)
treec177fe8578965d65f59184147d3d16c7232b5d56
parent9d2094bc20af37d4373c16084e6d607a347c5910 (diff)
downloadarching-kaos-tools-de38fcf7bfbb5b8ba70e54621cb69f0b3aeba65c.tar.gz
arching-kaos-tools-de38fcf7bfbb5b8ba70e54621cb69f0b3aeba65c.tar.bz2
arching-kaos-tools-de38fcf7bfbb5b8ba70e54621cb69f0b3aeba65c.zip
At least reply something
-rw-r--r--api/routes/getChunk/index.js5
-rw-r--r--api/routes/getLeaf/index.js5
-rw-r--r--api/routes/getMap/index.js5
3 files changed, 15 insertions, 0 deletions
diff --git a/api/routes/getChunk/index.js b/api/routes/getChunk/index.js
index 031d2c8..6106aad 100644
--- a/api/routes/getChunk/index.js
+++ b/api/routes/getChunk/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)
{
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)
{
diff --git a/api/routes/getMap/index.js b/api/routes/getMap/index.js
index 60c7e0d..791afb5 100644
--- a/api/routes/getMap/index.js
+++ b/api/routes/getMap/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)
{