move configure webadmin and status out of setup logic
This commit is contained in:
@@ -10,7 +10,8 @@ exports = module.exports = {
|
||||
feedback: feedback,
|
||||
checkForUpdates: checkForUpdates,
|
||||
getLogs: getLogs,
|
||||
getLogStream: getLogStream
|
||||
getLogStream: getLogStream,
|
||||
getStatus: getStatus,
|
||||
};
|
||||
|
||||
var appstore = require('../appstore.js'),
|
||||
@@ -166,3 +167,11 @@ function getLogStream(req, res, next) {
|
||||
logStream.on('error', res.end.bind(res, null));
|
||||
});
|
||||
}
|
||||
|
||||
function getStatus(req, res, next) {
|
||||
cloudron.getStatus(function (error, status) {
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
next(new HttpSuccess(200, status));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user