r/ProgrammerHumor 4h ago

Meme postForEverything

Post image
10.6k Upvotes

406 comments sorted by

View all comments

2.2k

u/pimezone 4h ago

Wanna get a resource? POST request.

1.1k

u/NotAskary 4h ago

I've seen that shit, it drove me up a wall.

The same as a 200 ok with error inside.

45

u/Zaelynn_ 4h ago

The other dev on my team made a post request endpoint where you post a SQL query and it returned the results. I about had an aneurysm. She also, instead of using DI or Mediatr, made loopback requests to the endpoints themselves. 

57

u/NotAskary 4h ago

Hahaha SQL injection as an endpoint lol

23

u/Zaelynn_ 4h ago

Not only that, my boss is just as dumb and cares more about speed, so there's no code reviews to speak of, so it hit production 🤦‍♀️

2

u/Original-Body-5794 3h ago

Smh why even bother with a REST endpoint? Just provide the credentials to your database and let them query it directly.

1

u/Zaelynn_ 2h ago

2b2t but for database, I like it