(req: Request, res: Response)
| 36 | return res.send(updatedPost); |
| 37 | } |
| 38 | export async function getPostHandler(req: Request, res: Response) { |
| 39 | const postId = get(req, "params.postId"); |
| 40 | const post = await findPost({ postId }); |
| 41 | |
| 42 | if (!post) { |
| 43 | return res.sendStatus(404); |
| 44 | } |
| 45 | |
| 46 | return res.send(post); |
| 47 | } |
| 48 | |
| 49 | export async function deletePostHandler(req: Request, res: Response) { |
| 50 | const userId = get(req, "user._id"); |
nothing calls this directly
no test coverage detected