PHP Classes

File: resources/js/services/TaskService.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   Laravel React Task Management   resources/js/services/TaskService.js   Download  
File: resources/js/services/TaskService.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Laravel React Task Management
Application to manage tasks
Author: By
Last change:
Date: 1 year ago
Size: 704 bytes
 

Contents

Class file image Download
import Axios from "axios"; export const getTaskList = () => {}; /** * storeNewTask() * * @param {object} data */ export const storeNewTask = async (data) => { data.project_id = parseInt(data.project_id); return await Axios.post("http://localhost:8200/myTask/api/tasks", data).then( (res) => { return res.data; } ); }; export const updateTask = async (id, data) => { return await Axios.put( `http://localhost:8200/myTask/api/tasks/${id}`, data ).then((res) => { return res.data; }); }; export const deleteTask = async (id) => { return await Axios.delete( `http://localhost:8200/myTask/api/tasks/${id}` ).then((res) => { return res.data; }); };