cleaner rest api

This commit is contained in:
Athou
2013-04-16 09:30:34 +02:00
parent b6d8072090
commit 6c544237b2
2 changed files with 120 additions and 96 deletions

View File

@@ -162,15 +162,10 @@ module.factory('EntryService', function($resource, $http) {
params : {
_method : 'mark'
}
},
search : {
method : 'GET',
params : {
_method : 'search'
}
}
};
var res = $resource('rest/entries/:_method', {}, actions);
var res = $resource('rest/entries/:type/:_method', {}, actions);
res.search = $resource('rest/entries/search', {}, actions).get;
return res;
});