forked from Archives/Athou_commafeed
save settings on read mode change
This commit is contained in:
@@ -2,13 +2,7 @@ var module = angular.module('commafeed.services', [ 'ngResource' ]);
|
||||
|
||||
module.factory('CategoryService', [ '$resource', '$http',
|
||||
function($resource, $http) {
|
||||
var actions = {
|
||||
'get' : {
|
||||
method : 'GET'
|
||||
}
|
||||
};
|
||||
res = $resource('rest/subscriptions', {}, actions);
|
||||
return res;
|
||||
return $resource('rest/subscriptions');
|
||||
} ]);
|
||||
|
||||
module.factory('EntryService', [
|
||||
@@ -16,7 +10,7 @@ module.factory('EntryService', [
|
||||
'$http',
|
||||
function($resource, $http) {
|
||||
var actions = {
|
||||
'get' : {
|
||||
get : {
|
||||
method : 'GET',
|
||||
params : {
|
||||
_method : 'get'
|
||||
@@ -32,4 +26,13 @@ module.factory('EntryService', [
|
||||
res = $resource('rest/entries/:_method/:_type/:_id/:_readtype', {},
|
||||
actions);
|
||||
return res;
|
||||
} ]);
|
||||
} ]);
|
||||
|
||||
module.service('SettingsService', function($resource) {
|
||||
var s = {}
|
||||
s.settings = $resource('rest/settings/get').get();
|
||||
s.save = function() {
|
||||
$resource('rest/settings/save').save(s.settings);
|
||||
};
|
||||
return s;
|
||||
});
|
||||
Reference in New Issue
Block a user