0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/client/models/settings.js

21 lines
522 B
JavaScript
Raw Normal View History

/*global Ghost, _ */
2013-06-08 02:05:40 -03:00
(function () {
'use strict';
//id:0 is used to issue PUT requests
Ghost.Models.Settings = Ghost.ProgressModel.extend({
url: Ghost.paths.apiRoot + '/settings/?type=blog,theme,app',
id: '0',
parse: function (response) {
var result = _.reduce(response.settings, function (settings, setting) {
settings[setting.key] = setting.value;
return settings;
}, {});
return result;
}
2013-06-08 02:05:40 -03:00
});
2013-11-21 19:44:18 +01:00
}());