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.

32 lines
697 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. import ApiService from '@/services/api.service'
  2. class MemberService {
  3. constructor() {
  4. this.request = ApiService
  5. }
  6. getMemberList(projectId) {
  7. return this.request.get(`/projects/${projectId}/roles`)
  8. }
  9. addMember(projectId, user, role) {
  10. const data = {
  11. user,
  12. role
  13. }
  14. return this.request.post(`/projects/${projectId}/roles`, data)
  15. }
  16. deleteMember(projectId, userId) {
  17. return this.request.delete(`/projects/${projectId}/roles/${userId}`)
  18. }
  19. updateMemberRole(projectId, mappingId, role) {
  20. const data = {
  21. role
  22. }
  23. return this.request.patch(`/projects/${projectId}/roles/${mappingId}`, data)
  24. }
  25. }
  26. export default new MemberService()