Add files via upload
This commit is contained in:
6
frontend/src/api/deliverables.js
Normal file
6
frontend/src/api/deliverables.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import axios from 'axios'
|
||||
const B = '/api'
|
||||
export const fetchDeliverables = (pid) => axios.get(`${B}/deliverables`, { params: { project_id: pid } }).then(r => r.data)
|
||||
export const createDeliverable = (data) => axios.post(`${B}/deliverables`, data).then(r => r.data)
|
||||
export const updateDeliverable = (id, d) => axios.patch(`${B}/deliverables/${id}`, d).then(r => r.data)
|
||||
export const deleteDeliverable = (id) => axios.delete(`${B}/deliverables/${id}`).then(r => r.data)
|
||||
7
frontend/src/api/projects.js
Normal file
7
frontend/src/api/projects.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import axios from 'axios'
|
||||
const B = '/api'
|
||||
export const fetchProjects = () => axios.get(`${B}/projects`).then(r => r.data)
|
||||
export const fetchProject = (id) => axios.get(`${B}/projects/${id}`).then(r => r.data)
|
||||
export const createProject = (data) => axios.post(`${B}/projects`, data).then(r => r.data)
|
||||
export const updateProject = (id, d) => axios.patch(`${B}/projects/${id}`, d).then(r => r.data)
|
||||
export const deleteProject = (id) => axios.delete(`${B}/projects/${id}`).then(r => r.data)
|
||||
Reference in New Issue
Block a user