diff options
| author | ivar <i@oiee.no> | 2026-04-04 16:10:52 +0200 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2026-04-04 16:10:52 +0200 |
| commit | f045a49e6feb6f448faea073821a9661f8b710a3 (patch) | |
| tree | 8dcb53284d3f35b8ae2e4d1ca180c223b5d02784 /assets/components/site-greeting.js | |
| parent | d239993644aae8c29d5fc37e8c6209850140807c (diff) | |
| download | nebbet.no-f045a49e6feb6f448faea073821a9661f8b710a3.tar.xz nebbet.no-f045a49e6feb6f448faea073821a9661f8b710a3.zip | |
feat: add RenamePost with transactional rename and redirect creation
Implement RenamePost method that atomically:
1. Fetches the post record by old slug
2. Inserts a new record with the new slug
3. Deletes the old slug post
4. Collapses redirect chains (updates any redirects pointing to oldSlug to point to newSlug)
5. Creates a redirect from oldSlug to newSlug
All operations are transactional (all-or-nothing). Includes two comprehensive tests:
- TestRenamePost: basic rename with redirect creation and old slug deletion
- TestRenamePost_CollapsesChain: verifies redirect chains are collapsed correctly
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'assets/components/site-greeting.js')
0 files changed, 0 insertions, 0 deletions
