From 62d8d61771889cde166854aa6bafe049276724f1 Mon Sep 17 00:00:00 2001 From: Micheal Peter <79177019+myconpeter@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:29:56 +0100 Subject: [PATCH 1/2] feat: endpoint to create a comment on a blog post --- src/controllers/blogCommentController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/blogCommentController.ts b/src/controllers/blogCommentController.ts index c48a0ce3..570b039f 100644 --- a/src/controllers/blogCommentController.ts +++ b/src/controllers/blogCommentController.ts @@ -15,7 +15,7 @@ export class BlogCommentController { data: comment, }); } catch (error: any) { - if (error.message === "Blog not found") { + if (error.message === "Blog not") { res.status(404).json({ status: "unsuccessful", status_code: 404, From 17b583f090c27e6a295e4a00fc0f9ff98717635e Mon Sep 17 00:00:00 2001 From: Micheal Peter <79177019+myconpeter@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:31:42 +0100 Subject: [PATCH 2/2] feat: endpoint to create a comment on a blog post --- src/controllers/blogCommentController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/blogCommentController.ts b/src/controllers/blogCommentController.ts index 570b039f..c48a0ce3 100644 --- a/src/controllers/blogCommentController.ts +++ b/src/controllers/blogCommentController.ts @@ -15,7 +15,7 @@ export class BlogCommentController { data: comment, }); } catch (error: any) { - if (error.message === "Blog not") { + if (error.message === "Blog not found") { res.status(404).json({ status: "unsuccessful", status_code: 404,