Files
cloudron-box/src/routes/dashboard.js
T

18 lines
468 B
JavaScript
Raw Normal View History

2023-08-12 21:47:24 +05:30
'use strict';
exports = module.exports = {
getConfig,
};
const BoxError = require('../boxerror.js'),
dashboard = require('../dashboard.js'),
HttpSuccess = require('connect-lastmile').HttpSuccess,
safe = require('safetydance');
async function getConfig(req, res, next) {
const [error, cloudronConfig] = await safe(dashboard.getConfig());
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, cloudronConfig));
}