Browse Source

Update comment repository

pull/1233/head
Hironsan 4 years ago
parent
commit
90c72bdf6a
2 changed files with 3 additions and 3 deletions
  1. 4
      frontend/repositories/comment/api.ts
  2. 2
      frontend/repositories/comment/interface.ts

4
frontend/repositories/comment/api.ts

@ -35,8 +35,8 @@ export class FromApiCommentItemListRepository implements CommentItemListReposito
return CommentItem.valueOf(responseItem)
}
async delete(projectId: string, docId: string, item: CommentItem): Promise<void> {
const url = `/projects/${projectId}/docs/${docId}/comments/${item.id}`
async delete(projectId: string, docId: string, commentId: number): Promise<void> {
const url = `/projects/${projectId}/docs/${docId}/comments/${commentId}`
const response = await this.request.delete(url)
}

2
frontend/repositories/comment/interface.ts

@ -19,7 +19,7 @@ export interface CommentItemListRepository {
update(projectId: string, docId: string, item: CommentItem): Promise<CommentItem>
delete(projectId: string, docId: string, item: CommentItem): Promise<void>
delete(projectId: string, docId: string, commentId: number): Promise<void>
deleteBulk(projectId: string, items: number[]): Promise<void>
}
Loading…
Cancel
Save