From ece7d3b4508744f0ebf1d19674bee90ec3080db2 Mon Sep 17 00:00:00 2001 From: Matt Kirby <MattJKirby@outlook.com> Date: Sat, 22 Apr 2023 22:46:30 +0100 Subject: [PATCH] fixed comment route --- .../comment-service-2/src/Datastores/CommentDataStore.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-services/comment-service-2/src/Datastores/CommentDataStore.ts b/backend-services/comment-service-2/src/Datastores/CommentDataStore.ts index 8897d6dc..6300157f 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"); -- GitLab