JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
18 days ago11 views
👨‍💻Programming

Untitled Page

// Isolates all HTTP requests made to the TaskFlow Express API.
import axios from 'axios';

const api = axios.create({ baseURL: 'http://localhost:5001/api/tasks' });
export const getTasks = async (params = {}) => (await api.get('/', { params })).data;
export const createTask = async (task) => (await api.post('/', task)).data;
export const replaceTask = async (id, task) => (await api.put(`/${id}`, task)).data;
export const patchTask = async (id, updates) => (await api.patch(`/${id}`, updates)).data;
export const removeTask = async (id) => (await api.delete(`/${id}`)).data;
← Back to timeline