separate the provision status and cloudron status
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user