Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Apr 2, 2024
1 parent d1b26d6 commit fa10a2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/posts/middleware-auth.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Please stop using middleware to protect your routes"
description: "Stop overthinking and over-abstracting."
date: "2024-3-31"
date: "2024-03-31"
---

When talking about auth, there seems be a certain group that's adamant on using middleware to handle authorization. Middleware here refers to functions that run before every request.
Expand Down Expand Up @@ -84,7 +84,7 @@ If you're too lazy to write some basic if checks, maybe that's a you problem. Bu
```ts
app.get(
"/",
protectedRoute((req, res) => {
protectedRoute((req, res, user) => {
// ...
})
);
Expand Down

0 comments on commit fa10a2b

Please sign in to comment.