diff options
author | Minteck <contact@minteck.org> | 2022-06-04 09:13:03 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-06-04 09:13:03 +0200 |
commit | dd5c8c3e10851d3b8c5d7764c90035e1d976a958 (patch) | |
tree | de90f23501dd5ab19356ccd466792fd0f5c7bf49 /modules/write.js | |
parent | 90db3a8698d385f9ac2086d238cd58de20d153ba (diff) | |
download | equestriadb-dd5c8c3e10851d3b8c5d7764c90035e1d976a958.tar.gz equestriadb-dd5c8c3e10851d3b8c5d7764c90035e1d976a958.tar.bz2 equestriadb-dd5c8c3e10851d3b8c5d7764c90035e1d976a958.zip |
Diffstat (limited to 'modules/write.js')
-rw-r--r-- | modules/write.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/write.js b/modules/write.js index d733360..48ab1d6 100644 --- a/modules/write.js +++ b/modules/write.js @@ -6,6 +6,13 @@ module.exports = (req, res, entry, dbid) => { res.writeHead(200, {'Content-Type':'application/json'}); body(req, res, variables.bodyOptions, (err, body) => { try { + if (databases[entry]["immutable"]) { + res.writeHead(501, {'Content-Type':'application/json'}); + res.write("{\"error\":501}"); + res.end(); + return; + } + if (err) throw err; console.log(body); if (typeof body.path === "string" && typeof body.data === "string") { |