Files
planka/server/api/controllers/config/show.js

38 lines
916 B
JavaScript
Raw Normal View History

/*!
* Copyright (c) 2024 PLANKA Software GmbH
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
*/
2025-09-08 16:20:27 +02:00
/**
* @swagger
* /config:
2025-09-08 16:20:27 +02:00
* get:
* summary: Get application configuration
* description: Retrieves the application configuration. Requires admin privileges.
2025-09-08 16:20:27 +02:00
* tags:
* - Config
2025-09-12 12:17:01 +02:00
* operationId: getConfig
2025-09-08 16:20:27 +02:00
* responses:
* 200:
* description: Configuration retrieved successfully
* content:
* application/json:
* schema:
* type: object
* required:
* - item
* properties:
* item:
* $ref: '#/components/schemas/Config'
*/
module.exports = {
async fn() {
const config = await Config.qm.getOneMain();
return {
item: sails.helpers.config.presentOne(config),
};
},
};