import fetch from 'isomorphic-fetch'
import getTaskList from './common'


const changeStatus = (data)=>{
      
      let {taskId,currentTaskType}=data.taskInfo;
      let url = `http://192.168.10.128:8080/web/flat/work/lr/status/${taskId}/${currentTaskType}`
      return (dispatch)=>{
            fetch(url,{
                credentials : 'include',
                method : 'PUT',
                mode : 'cors',
                body : {}
            }).then((response)=>response.json())
             .then((json)=>{
                  if(json.data){
                        getTaskList(data)
                  }
             })
      }
}


const changeTaskStatus = (data)=>{
      return {

      }
}