cleanup status route

this is now purely a healthcheck route and nothing else

at some point, we will server render password reset and setup account views
This commit is contained in:
Girish Ramakrishnan
2023-08-10 22:15:45 +05:30
parent 1cdd528b45
commit 955a43723f
7 changed files with 26 additions and 13 deletions

View File

@@ -6,11 +6,14 @@ exports = module.exports = {
passwordResetRequest,
passwordReset,
setupAccount,
getBranding
};
const assert = require('assert'),
AuditSource = require('../auditsource.js'),
BoxError = require('../boxerror.js'),
branding = require('../branding.js'),
cloudron = require('../cloudron.js'),
constants = require('../constants.js'),
debug = require('debug')('box:routes/cloudron'),
eventlog = require('../eventlog.js'),
@@ -115,3 +118,15 @@ async function setupAccount(req, res, next) {
next(new HttpSuccess(201, { accessToken }));
}
async function getBranding(req, res, next) {
// still used in passwordreset and setupaccount views. we should server render them
const result = {
cloudronName: await branding.getCloudronName(),
footer: await branding.renderFooter(),
language: await cloudron.getLanguage(),
};
next(new HttpSuccess(200, result));
}