reverseproxy: move renew and trusted ip routes
This commit is contained in:
@@ -17,7 +17,6 @@ exports = module.exports = {
|
||||
getLogStream,
|
||||
updateDashboardDomain,
|
||||
prepareDashboardDomain,
|
||||
renewCerts,
|
||||
getLanguages,
|
||||
getSystemGraphs,
|
||||
getPlatformStatus,
|
||||
@@ -272,15 +271,6 @@ async function prepareDashboardDomain(req, res, next) {
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
async function renewCerts(req, res, next) {
|
||||
if ('rebuild' in req.body && typeof req.body.rebuild !== 'boolean') return next(new HttpError(400, 'rebuild must be a boolean'));
|
||||
|
||||
const [error, taskId] = await safe(cloudron.renewCerts(req.body, AuditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
next(new HttpSuccess(202, { taskId }));
|
||||
}
|
||||
|
||||
async function getLanguages(req, res, next) {
|
||||
const [error, languages] = await safe(translation.getLanguages());
|
||||
if (error) return next(new BoxError.toHttpError(error));
|
||||
|
||||
Reference in New Issue
Block a user