Parent PRD
#155
What to build
Create a new API endpoint GET /api/posts/{id}/html that fetches cleaned HTML from the cleanedposts blob container and returns it to the client. The endpoint should return the HTML content with Content-Type: text/html on success, or a 404 error with a clear message if the blob does not exist.
The endpoint follows the same auth and routing patterns as existing post endpoints in PostEndpoints.cs. The blob container name is cleanedposts and blob files are named {postId}.html.
Acceptance criteria
Blocked by
None - can start immediately
User stories addressed
- User story 15: As a developer, I want a new API endpoint
GET /api/posts/{id}/html that fetches from the cleanedposts blob container
- User story 16: As a developer, I want the API endpoint to return a clear error when the HTML file doesn't exist
Parent PRD
#155
What to build
Create a new API endpoint
GET /api/posts/{id}/htmlthat fetches cleaned HTML from thecleanedpostsblob container and returns it to the client. The endpoint should return the HTML content withContent-Type: text/htmlon success, or a 404 error with a clear message if the blob does not exist.The endpoint follows the same auth and routing patterns as existing post endpoints in
PostEndpoints.cs. The blob container name iscleanedpostsand blob files are named{postId}.html.Acceptance criteria
GET /api/posts/{postId}/htmlis registered in the APIcleanedpostscontainer using name{postId}.htmlContent-Type: text/htmland the HTML body when the blob exists{ "error": "Post HTML not found" }when the blob does not existBlocked by
None - can start immediately
User stories addressed
GET /api/posts/{id}/htmlthat fetches from thecleanedpostsblob container