aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/service/configSchemaGET.js
diff options
context:
space:
mode:
authorKana <[email protected]>2021-06-19 02:03:57 +0900
committerGitHub <[email protected]>2021-06-19 02:03:57 +0900
commit065c5221a0250838f1d1f9bb7a7922ff4f55e038 (patch)
tree8a69a81f00e6bff2752f4f7c59dcbbf21f893b20 /src/api/routes/service/configSchemaGET.js
parentchore: docs update (diff)
parentfix: potentially fix the blocked extensions array splitting (diff)
downloadhost.fuwn.me-065c5221a0250838f1d1f9bb7a7922ff4f55e038.tar.xz
host.fuwn.me-065c5221a0250838f1d1f9bb7a7922ff4f55e038.zip
Merge pull request #278 from Zephyrrus/Zephyrrus-feature/database_based_settings
Zephyrrus feature/database based settings
Diffstat (limited to 'src/api/routes/service/configSchemaGET.js')
-rw-r--r--src/api/routes/service/configSchemaGET.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/api/routes/service/configSchemaGET.js b/src/api/routes/service/configSchemaGET.js
new file mode 100644
index 0000000..90befa9
--- /dev/null
+++ b/src/api/routes/service/configSchemaGET.js
@@ -0,0 +1,17 @@
+const Route = require('../../structures/Route');
+const { configSchema } = require('../../structures/Setting');
+
+class configGET extends Route {
+ constructor() {
+ super('/service/config/schema', 'get', { adminOnly: true });
+ }
+
+ run(req, res) {
+ return res.json({
+ message: 'Successfully retrieved schema',
+ schema: configSchema
+ });
+ }
+}
+
+module.exports = configGET;