---
title: "Mohammed Arafat (@MohammedArafat) | Hashnode"
description: "Mohammed Arafat (@MohammedArafat) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@MohammedArafat"
---

@MohammedArafat

# Mohammed Arafat

@MohammedArafat · Joined June 2025

## Comments

[You don't need to create the middlewear to just check if video exists or not, you simply call the const video=Video.findByIdAndDelete(id); if(!video) res.status(404).json({message:"Video not found"}) and letter the success response comes, this is more better approach](https://hashnode.com/posts/optimizing-express-middleware-passing-data-via-req-to-avoid-extra-db-queries/6835eb2a07b1990086c5e7bc/comment/683f2e0f007d12c244379c67)

Comment · Article · Jun 3, 2025 · [Optimizing Express Middleware: Passing Data via req to Avoid Extra DB Queries](https://hashnode.com/posts/optimizing-express-middleware-passing-data-via-req-to-avoid-extra-db-queries/6835eb2a07b1990086c5e7bc)
