track the config state in cloudron.js

This commit is contained in:
Girish Ramakrishnan
2017-01-05 19:01:44 -08:00
committed by Johannes Zellner
parent 09997398b1
commit 8f4ed47b63
2 changed files with 14 additions and 9 deletions

View File

@@ -101,14 +101,7 @@ function dnsSetup(req, res, next) {
}
function dnsReady(req, res, next) {
if (config.provider() === 'caas') return next(new HttpError(410, 'Not availabe for caas'));
if (!config.fqdn()) return next(new HttpSuccess(200, { domain: false, ssl: false, dns: false }));
if (!certificates.adminCertificateExists()) return next(new HttpSuccess(200, { domain: true, ssl: false, dns: false }));
// TODO also check for DNS
next(new HttpSuccess(200, { domain: true, ssl: true, dns: false }));
next(new HttpSuccess(200, cloudron.getConfigStateSync()));
}
function setupTokenAuth(req, res, next) {