Skip to content

Commit

Permalink
fixed lint test identation issues in the src/controllers/write/post.j…
Browse files Browse the repository at this point in the history
…s. The issue was about identation syntax issues from line 185 but there one issue i can not fix since there is dependence so i am waiting for my teammate to implement his part so that i can pass lint test
  • Loading branch information
jdufitum committed Oct 7, 2024
1 parent aa381ee commit e06ea15
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/controllers/write/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ Posts.getReplies = async (req, res) => {
};
// Add the approve function
Posts.approve = async (req, res) => {
try {
const { pid } = req.params;
// Assuming you have a function to mark the post as approved
await markPostAsApproved(pid, req.user.id);
res.status(200).json({ message: 'Post approved successfully' });
} catch (error) {
res.status(500).json({ error: 'An error occurred while approving the post' });
}
try {
const { pid } = req.params;
// Assuming you have a function to mark the post as approved
await markPostAsApproved(pid, req.user.id);

Check failure on line 187 in src/controllers/write/posts.js

View workflow job for this annotation

GitHub Actions / test

'markPostAsApproved' is not defined
res.status(200).json({ message: 'Post approved successfully' });
} catch (error) {
res.status(500).json({ error: 'An error occurred while approving the post' });
}
};

0 comments on commit e06ea15

Please sign in to comment.