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.
 
 
 
 
 
 

26 lines
752 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`)
}
addComment(projectId, docId, payload) {
console.log(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()