({
commentId,
fileUrl,
teamId,
}: {
commentId: string;
fileUrl: string;
teamId: string;
})
| 107 | } |
| 108 | |
| 109 | public async deleteFileStoreMethod({ |
| 110 | commentId, |
| 111 | fileUrl, |
| 112 | teamId, |
| 113 | }: { |
| 114 | commentId: string; |
| 115 | fileUrl: string; |
| 116 | teamId: string; |
| 117 | }) { |
| 118 | try { |
| 119 | await deleteFileForCommentApiMethod({ |
| 120 | commentId, |
| 121 | fileUrl, |
| 122 | teamId, |
| 123 | socketId: (this.store.socket && this.store.socket.id) || null, |
| 124 | discussionId: this.discussionId, |
| 125 | }); |
| 126 | |
| 127 | runInAction(() => { |
| 128 | const filteredFiles = this.files.filter((f) => f.fileUrl !== fileUrl); |
| 129 | this.files.replace(filteredFiles); |
| 130 | }); |
| 131 | } catch (error) { |
| 132 | console.log(error); |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | export { Comment }; |
no test coverage detected