15

Instructions on how to become suicidal:

- Create an API controller for the /file/ path
- Add an empty endpoint for POST /file/upload (will write it later!)
- Forget about this endpoint at some point
- Later, create a page for /file/upload
- GET /file/upload returns page
- POST /file/upload returns empty 200

Pure psychological horror for like an hour Googling why the fuck my razor page is returning empty responses and my breakpoint on OnPost is not fucking hitting even if I copy and paste example code from the ms website

Oh yeah, that controller.

Comments
  • 1
  • 2
    This is why I always suffix my api application
  • 1
    @ars1 this API controller was more of just a controller, it's to serve files from the db for use on pages. It's not a true API, where I would separate it and route it via /api/ or something
  • 8
    I always throw an exception in placeholder code: assert(false, 'TODO')
  • 6
    >will write it later

    throw new NotImplementedException();

    😊
Add Comment