commit service with $resource