You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
597 B

  1. import ApiService from '@/services/api.service'
  2. class ProjectService {
  3. constructor() {
  4. this.request = ApiService
  5. }
  6. getProjectList() {
  7. return this.request.get('/projects')
  8. }
  9. createProject(data) {
  10. return this.request.post('/projects', data)
  11. }
  12. updateProject(projectId, payload) {
  13. return this.request.patch(`/projects/${projectId}`, payload)
  14. }
  15. deleteProject(projectId) {
  16. return this.request.delete(`/projects/${projectId}`)
  17. }
  18. fetchProjectById(projectId) {
  19. return this.request.get(`/projects/${projectId}`)
  20. }
  21. }
  22. export default new ProjectService()