aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/service
diff options
context:
space:
mode:
authorPitu <[email protected]>2021-03-23 22:24:11 +0900
committerPitu <[email protected]>2021-03-23 22:24:11 +0900
commitb24c0175f5ef7ac3ac1f3689bc4f96c4d65d2a52 (patch)
tree17c711a4fd949da681a19a21e044a6d7576cb301 /src/api/routes/service
parentchore: add screenshots to the readme (diff)
parentfix: sections not rendering (diff)
downloadhost.fuwn.me-b24c0175f5ef7ac3ac1f3689bc4f96c4d65d2a52.tar.xz
host.fuwn.me-b24c0175f5ef7ac3ac1f3689bc4f96c4d65d2a52.zip
Merge branch 'feature/database_based_settings' of https://github.com/Zephyrrus/huskysafe into Zephyrrus-feature/database_based_settings
Diffstat (limited to 'src/api/routes/service')
-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;