Browse Source

ModeratePost: Assume thread must exist and be mutable

Leszek Wiesner 3 years ago
parent
commit
be28f0b529
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cli/src/commands/forum/moderatePost.ts

+ 2 - 2
cli/src/commands/forum/moderatePost.ts

@@ -34,9 +34,9 @@ export default class ForumModeratePostCommand extends ForumCommandBase {
     const api = await this.getOriginalApi()
     const { categoryId, threadId, postId, rationale, context } = this.parse(ForumModeratePostCommand).flags
 
-    // FIXME: Check if thread exists in category
-    // Currently the runtime does not check it (https://github.com/Joystream/joystream/issues/3111)
     await this.ensureCategoryExists(categoryId)
+    await this.ensureCategoryMutable(categoryId)
+    await this.ensureThreadExists(categoryId, threadId)
     const post = await this.getPost(threadId, postId)
     const [key, actor] = await this.getForumModerationContext([categoryId], context)