(req, res)
| 6 | const router = express.Router(); |
| 7 | |
| 8 | export const getPosts = async (req, res) => { |
| 9 | try { |
| 10 | const postMessages = await PostMessage.find(); |
| 11 | |
| 12 | res.status(200).json(postMessages); |
| 13 | } catch (error) { |
| 14 | res.status(404).json({ message: error.message }); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | export const getPost = async (req, res) => { |
| 19 | const { id } = req.params; |
nothing calls this directly
no outgoing calls
no test coverage detected