import angular from 'angular';

class TasksService {
  constructor($http) {
    this.$http = $http;
  }

  getTasks() {
    return this.$http({
      method: 'GET',
      url: '/api/tasks'
    });
  }

  createTask(task) {
    if (!angular.isObject(task)) {
      return false;
    }
    return this.$http({
      method: 'POST',
      url: '/api/newtask',
      data: task
    });
  }

  removeTask(id) {
    if (!angular.isString(id)) {
      return false;
    }
    return this.$http({
      method: 'DELETE',
      url: '/api/task/' + id,
      headers: {"Content-Type": "application/json;charset=utf-8"}
    });
  }
}

TasksService.$inject = ['$http'];

export default TasksService;

@@ -22,17 +22,16 @@
 angular'
-;
 %0A%0Aclass 
@@ -90,17 +90,16 @@
  = $http
-;
 %0A  %7D%0A%0A  
@@ -259,33 +259,32 @@
     return false
-;
 %0A    %7D%0A    retur
@@ -447,17 +447,16 @@
 rn false
-;
 %0A    %7D%0A 
@@ -645,17 +645,16 @@
 '$http'%5D
-;
 %0A%0Aexport
@@ -674,10 +674,9 @@
 sService
-;
 %0A

Update TasksService.js