/
foult080
/
hackaton-app
Обзор
Документация
Войти
/
foult080
/
hackaton-app
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
web-app/src/api/tasks.ts
18 строк
584 B
Foult080
feat(): new integration updates
09 июл 2026, 09:52
09 июл 2026, 09:52
e34b51e
Код
Авторство
О чём код?
import client from './client' import type { ApiResponse } from '../types/api' import type { Task } from '../types/task' export const tasksApi = { getAll() { return client.get<ApiResponse<Task[]>>('/tasks') }, create(data: { title: string; description: string }) { return client.post<ApiResponse<Task>>('/tasks', data) }, update(id: string, data: { title?: string; description?: string }) { return client.patch<ApiResponse<Task>>(`/tasks/${id}`, data) }, delete(id: string) { return client.delete<ApiResponse<{ message: string }>>(`/tasks/${id}`) }, }