summaryrefslogtreecommitdiffstats
path: root/assets/admin/lib/component-tool.js
diff options
context:
space:
mode:
authorivar <i@oiee.no>2026-04-04 16:10:52 +0200
committerivar <i@oiee.no>2026-04-04 16:10:52 +0200
commitf045a49e6feb6f448faea073821a9661f8b710a3 (patch)
tree8dcb53284d3f35b8ae2e4d1ca180c223b5d02784 /assets/admin/lib/component-tool.js
parentd239993644aae8c29d5fc37e8c6209850140807c (diff)
downloadnebbet.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/admin/lib/component-tool.js')
0 files changed, 0 insertions, 0 deletions