2014-04-27 18:28:50 -05:00
|
|
|
/*global Ghost, _ */
|
2013-06-08 02:05:40 -03:00
|
|
|
(function () {
|
2013-09-24 12:46:30 +02:00
|
|
|
'use strict';
|
2013-09-11 16:37:23 +00:00
|
|
|
//id:0 is used to issue PUT requests
|
2013-11-22 21:47:03 +00:00
|
|
|
Ghost.Models.Settings = Ghost.ProgressModel.extend({
|
2014-02-23 12:32:35 +00:00
|
|
|
url: Ghost.paths.apiRoot + '/settings/?type=blog,theme,app',
|
2014-04-27 18:28:50 -05:00
|
|
|
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
|
|
|
}());
|