diff options
| author | Zephyrrus <[email protected]> | 2021-01-10 02:04:35 +0200 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2021-01-10 02:04:35 +0200 |
| commit | 46ef63fb9f3c2688118a9d1511293128cfdfe4c9 (patch) | |
| tree | 5fc64b84464938f05470aeccd6066ac33922f590 /src/api/routes | |
| parent | feat: create settings schema (used for rendering and validating) (diff) | |
| download | host.fuwn.me-46ef63fb9f3c2688118a9d1511293128cfdfe4c9.tar.xz host.fuwn.me-46ef63fb9f3c2688118a9d1511293128cfdfe4c9.zip | |
feat: add dynamic settings page rendering based on the Joi object
Diffstat (limited to 'src/api/routes')
| -rw-r--r-- | src/api/routes/service/configSchemaGET.js | 17 |
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; |