mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
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
828 B
29 lines
828 B
import ApiService from '@/services/api.service'
|
|
|
|
class CommentService {
|
|
constructor() {
|
|
this.request = ApiService
|
|
}
|
|
|
|
getCommentList(projectId, docId) {
|
|
return this.request.get(`/projects/${projectId}/docs/${docId}/comments`)
|
|
}
|
|
|
|
getProjectCommentList(projectId) {
|
|
return this.request.get(`/projects/${projectId}/comments`)
|
|
}
|
|
|
|
addComment(projectId, docId, payload) {
|
|
return this.request.post(`/projects/${projectId}/docs/${docId}/comments`, payload)
|
|
}
|
|
|
|
deleteComment(projectId, docId, commentId) {
|
|
return this.request.delete(`/projects/${projectId}/docs/${docId}/comments/${commentId}`)
|
|
}
|
|
|
|
updateComment(projectId, docId, commentId, payload) {
|
|
return this.request.patch(`/projects/${projectId}/docs/${docId}/comments/${commentId}`, payload)
|
|
}
|
|
}
|
|
|
|
export default new CommentService()
|