settings: move language and tz into cloudron.js

This commit is contained in:
Girish Ramakrishnan
2023-08-04 10:10:08 +05:30
parent ec23c7d2b8
commit 775246946a
13 changed files with 246 additions and 165 deletions
+4 -4
View File
@@ -1281,7 +1281,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.setTimeZone = function (timeZone, callback) {
post('/api/v1/settings/time_zone', { timeZone: timeZone }, null, function (error, data, status) {
post('/api/v1/cloudron/time_zone', { timeZone: timeZone }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
@@ -1290,7 +1290,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.getTimeZone = function (callback) {
get('/api/v1/settings/time_zone', null, function (error, data, status) {
get('/api/v1/cloudron/time_zone', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
@@ -1299,7 +1299,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.setLanguage = function (language, callback) {
post('/api/v1/settings/language', { language: language }, null, function (error, data, status) {
post('/api/v1/cloudron/language', { language: language }, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));
@@ -1308,7 +1308,7 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
};
Client.prototype.getLanguage = function (callback) {
get('/api/v1/settings/language', null, function (error, data, status) {
get('/api/v1/cloudron/language', null, function (error, data, status) {
if (error) return callback(error);
if (status !== 200) return callback(new ClientError(status, data));