I have two services:
var PlanResource = $resource('/api/v1/plan/:planId', {}, {
'update': { method:'PUT', params:{ planId : '@_id.$oid' }, isArray : false },
});
and
var UserResource = $resource('/api/v1/user', {}, {
'update': {method:'PUT', params:{ }, isArray : false},
});
When I call update on the first it puts the data I pass in the body where as the second puts the data in the URL for example:
PUT /api/v1/user?profiles=%7B%22skeleton%22:false,%data%22:234
Why does this happen, and how can I get the second to put the data in the body?
EDIT:
Usage is:
ctrl.user.$update({'profiles' : appCtrl.user.profiles}).then(function() {
and
ctrl.plan.$update({name: planName});