separate the provision status and cloudron status

This commit is contained in:
Girish Ramakrishnan
2023-08-10 18:45:27 +05:30
parent 98719aa942
commit 1cdd528b45
13 changed files with 93 additions and 75 deletions
+8
View File
@@ -1,6 +1,7 @@
'use strict';
exports = module.exports = {
getStatus,
getConfig,
updateDashboardDomain,
@@ -26,6 +27,13 @@ const assert = require('assert'),
safe = require('safetydance'),
translation = require('../translation.js');
async function getStatus(req, res, next) {
const [error, status] = await safe(cloudron.getStatus());
if (error) return next(BoxError.toHttpError(error));
next(new HttpSuccess(200, status));
}
async function getConfig(req, res, next) {
const [error, cloudronConfig] = await safe(cloudron.getConfig());
if (error) return next(BoxError.toHttpError(error));