import {Module, Service} from '../../../decorators';
import RestangularConfig from '../../../config/restangular';

@Module({
    name : 'ps.common.service.data.updateService',
    modules : [ RestangularConfig ]
})
@Service('UpdateService')
export default class UpdateService {
    constructor(Restangular) {
        "ngInject";
        this.baseTask = Restangular.one("task");
    }

    forceUpdatePodcast(idPodcast) {
        return this.baseTask.customPOST(idPodcast, "updateManager/updatePodcast/force");
    }
}


@@ -49,69 +49,8 @@
 rs';
-%0Aimport RestangularConfig from '../../../config/restangular';
 %0A%0A@M
@@ -110,45 +110,8 @@
 ice'
-,%0A    modules : %5B RestangularConfig %5D
 %0A%7D)%0A
@@ -189,27 +189,21 @@
 tructor(
-Restangular
+$http
 ) %7B%0A    
@@ -235,42 +235,21 @@
 his.
-baseTask = Restangular.one(%22task%22)
+$http = $http
 ;%0A  
@@ -313,40 +313,30 @@
 his.
-baseTask.customPOST(idPodcast, %22
+$http.post('/api/task/
 upda
@@ -364,17 +364,28 @@
 st/force
-%22
+', idPodcast
 );%0A    %7D

move from Restangular to native $http