mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
23 lines
667 B
JavaScript
Executable file
23 lines
667 B
JavaScript
Executable file
import http from './http';
|
|
import socket from './socket';
|
|
|
|
/* Actions */
|
|
|
|
const getProjects = (headers) => socket.get('/projects', undefined, headers);
|
|
|
|
const createProject = (data, headers) => socket.post('/projects', data, headers);
|
|
|
|
const updateProject = (id, data, headers) => socket.patch(`/projects/${id}`, data, headers);
|
|
|
|
const updateProjectBackgroundImage = (id, data, headers) =>
|
|
http.post(`/projects/${id}/background-image`, data, headers);
|
|
|
|
const deleteProject = (id, headers) => socket.delete(`/projects/${id}`, undefined, headers);
|
|
|
|
export default {
|
|
getProjects,
|
|
createProject,
|
|
updateProject,
|
|
updateProjectBackgroundImage,
|
|
deleteProject,
|
|
};
|