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");
    }
}


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

@Module({
    name : 'ps.common.service.data.updateService'
})
@Service('UpdateService')
export default class UpdateService {
    constructor($http) {
        "ngInject";
        this.$http = $http;
    }

    forceUpdatePodcast(idPodcast) {
        return this.$http.post('/api/task/updateManager/updatePodcast/force', idPodcast);
    }
}


move from Restangular to native $http