diff --git a/backend-services/comment-service-2/src/Datastores/CommentDataStore.ts b/backend-services/comment-service-2/src/Datastores/CommentDataStore.ts index 8897d6dcf0d03276661d7ccc723368b39b4f8e22..6300157fcc2b5dc0d6b6cb495afaf7b851a7d425 100644 --- a/backend-services/comment-service-2/src/Datastores/CommentDataStore.ts +++ b/backend-services/comment-service-2/src/Datastores/CommentDataStore.ts @@ -45,7 +45,7 @@ class CommentDataStore extends DataStore<any> { jwtAuthorId: string, commentId: string ): Promise<void> => { - const comment = await this.Model.findById({ commentId }); + const comment = await this.Model.findById(commentId); if (comment.AuthorId !== jwtAuthorId) { throw new Error("Unauthorised");