Skip to content

Commit

Permalink
fix(server): removed unnecessary consoles from postController
Browse files Browse the repository at this point in the history
  • Loading branch information
AdwaithAthman committed Dec 19, 2023
1 parent a3bf0ab commit f59682c
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions server/src/adapters/postController/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,13 @@ const postController = (
// mimetype = null;
// }
const files = req.files as Express.Multer.File[];
console.log("files from req.files: ", files)
console.log("postData from req.body: ", postData)
const post = await handleCreatePost(
postData,
files,
cloudinaryService,
postDbRepository,
dbUserRepository
);

// const post = await handleCreatePost(
// postData,
// buffer,
// mimetype,
// cloudinaryService,
// postDbRepository,
// dbUserRepository
// );
res.json({
status: "success",
message: "post created",
Expand Down Expand Up @@ -227,7 +216,6 @@ const postController = (
const editPost = asyncHandler(async (req: Request, res: Response) => {
const { postId } = req.params as unknown as { postId: string };
const postData = req.body;
console.log("postData from req.body: ", postData);
const editedPost = await handleEditPost(postId, postData, postDbRepository);
res.json({
status: "success",
Expand All @@ -238,7 +226,6 @@ const postController = (

const editComment = asyncHandler(async (req: Request, res: Response) => {
const { commentId } = req.params as unknown as { commentId: string };
console.log("edited commment req.body: ", req.body);
const { comment }: { comment: string } = req.body;
const editedComment = await handleEditComment(
commentId,
Expand Down Expand Up @@ -325,7 +312,6 @@ const postController = (
action: string;
userId: string;
};
console.log("req body for comment like: ", req.body);
const message = await handleLikeComment(
commentId,
userId,
Expand Down

0 comments on commit f59682c

Please sign in to comment.