Archived
This repository has been archived on 2026-09-03 . You can view files and clone it. You cannot open issues or pull requests or push a commit.
ef5680c654b3288bdcdafd4408a9233fb5d46fde
Search downloaded every post to every visitor and filtered the list with String.includes, so it could only ever match what a summary carries — a phrase from the body of a post was unfindable, and the cost grew with each post published. It is now a query (/api/posts/search) that searches the body too. The home page picked 'the latest post' by taking element zero of that list, which was only correct for as long as the API happened to return posts in that order. /api/home now decides what leads, what counts as recent, and the tag counts, in one call. Tag counting moves out of the controller into TagService, shared by both. The LIKE escaping needed an explicit ESCAPE clause: there is no default escape character to rely on, and posts are markdown full of literal backslashes — escaping with a backslash turned a search for '%' into a search for backslashes and matched unrelated posts. Caught by the new tests. Also on platform 0.1.6 (contact-form header-injection fix).
Languages
TypeScript
54%
Java
42.2%
CSS
1.9%
Dockerfile
1.5%
HTML
0.4%