2025-05-10 02:09:06 +02:00
|
|
|
/*!
|
|
|
|
|
* 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
|
2025-09-08 18:25:26 +02:00
|
|
|
* /config:
|
2025-09-08 16:20:27 +02:00
|
|
|
* get:
|
|
|
|
|
* summary: Get application configuration
|
2025-09-22 20:35:13 +02:00
|
|
|
* 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'
|
|
|
|
|
*/
|
|
|
|
|
|
2025-05-10 02:09:06 +02:00
|
|
|
module.exports = {
|
|
|
|
|
async fn() {
|
2025-09-22 20:35:13 +02:00
|
|
|
const config = await Config.qm.getOneMain();
|
2025-05-10 02:09:06 +02:00
|
|
|
|
|
|
|
|
return {
|
2025-09-22 20:35:13 +02:00
|
|
|
item: sails.helpers.config.presentOne(config),
|
2025-05-10 02:09:06 +02:00
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
};
|