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

  1. import ApiService from '@/services/api.service'
  2. class CommentService {
  3. constructor() {
  4. this.request = ApiService
  5. }
  6. getCommentList({ projectId, docId }) {
  7. return this.request.get(`/projects/${projectId}/docs/${docId}/comments`)
  8. }
  9. addComment(projectId, docId, payload) {
  10. console.log(payload)
  11. return this.request.post(`/projects/${projectId}/docs/${docId}/comments`, payload)
  12. }
  13. deleteComment(projectId, docId, commentId) {
  14. return this.request.delete(`/projects/${projectId}/docs/${docId}/comments/${commentId}`)
  15. }
  16. updateComment(projectId, docId, commentId, payload) {
  17. return this.request.patch(`/projects/${projectId}/docs/${docId}/comments/${commentId}`, payload)
  18. }
  19. }
  20. export default new CommentService()