settings: move language and tz into cloudron.js
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user