mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
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
32 lines
697 B
import ApiService from '@/services/api.service'
|
|
|
|
class MemberService {
|
|
constructor() {
|
|
this.request = ApiService
|
|
}
|
|
|
|
getMemberList(projectId) {
|
|
return this.request.get(`/projects/${projectId}/roles`)
|
|
}
|
|
|
|
addMember(projectId, user, role) {
|
|
const data = {
|
|
user,
|
|
role
|
|
}
|
|
return this.request.post(`/projects/${projectId}/roles`, data)
|
|
}
|
|
|
|
deleteMember(projectId, userId) {
|
|
return this.request.delete(`/projects/${projectId}/roles/${userId}`)
|
|
}
|
|
|
|
updateMemberRole(projectId, mappingId, role) {
|
|
const data = {
|
|
role
|
|
}
|
|
return this.request.patch(`/projects/${projectId}/roles/${mappingId}`, data)
|
|
}
|
|
}
|
|
|
|
export default new MemberService()
|