MCPcopy Create free account
hub / github.com/async-labs/async / deleteFileStoreMethod

Method deleteFileStoreMethod

app/lib/store/Comment.ts:109–134  ·  view source on GitHub ↗
({
    commentId,
    fileUrl,
    teamId,
  }: {
    commentId: string;
    fileUrl: string;
    teamId: string;
  })

Source from the content-addressed store, hash-verified

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
137export { Comment };

Callers 2

DiscussionDetailClass · 0.45
ChatDetailClass · 0.45

Calls 1

Tested by

no test coverage detected