add route to get the timezone
This commit is contained in:
@@ -16,6 +16,8 @@ exports = module.exports = {
|
||||
getBackupConfig: getBackupConfig,
|
||||
setBackupConfig: setBackupConfig,
|
||||
|
||||
getTimeZone: getTimeZone,
|
||||
|
||||
setCertificate: setCertificate,
|
||||
setAdminCertificate: setAdminCertificate
|
||||
};
|
||||
@@ -69,6 +71,13 @@ function getCloudronName(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function getTimeZone(req, res, next) {
|
||||
settings.getTimeZone(function (error, tz) {
|
||||
if (error) return next(new HttpError(500, error));
|
||||
next(new HttpSuccess(200, { timeZone: tz }));
|
||||
});
|
||||
}
|
||||
|
||||
function setCloudronAvatar(req, res, next) {
|
||||
assert.strictEqual(typeof req.files, 'object');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user