WebHooker/server/lib
RhenCloud b313cdc2fe
fix: prevent cascade deletion of routes when updating groups
Previously, saveGroups() used DELETE FROM d1_groups followed by re-insertion,
which triggered ON DELETE CASCADE and wiped all routes whenever any group was updated.

Changes:
- Use INSERT...ON CONFLICT DO UPDATE (upsert) instead of delete-then-insert
- Only delete groups that are actually being removed
- Delete routes first, then delete groups (proper cascade order)
- Load existing group IDs before saving to detect deletions

This fixes the critical bug where updating one group's metadata would
delete all routes across all groups.

Data recovery: Used D1 Time Travel to restore from bookmark
000018f9-00000002-000050de-f23b7bfe5ccdc00e9c9dec3a4de8bc81 (before
the problematic group update), recovering 18 routes.
2026-09-10 22:29:47 +08:00
..
config feat(feishu): add Feishu inbound webhook, /gh commands and card actions 2026-08-27 00:07:05 +08:00
core chore: auto-fix lint & formatting [skip ci] 2026-08-27 14:00:26 +00:00
drivers chore: auto-fix lint & formatting [skip ci] 2026-08-26 16:39:02 +00:00
events chore: auto-fix lint & formatting [skip ci] 2026-08-24 14:52:59 +00:00
formatters fix(check): key check_run in-place edits on check name + head_sha 2026-08-31 01:17:13 +08:00
github chore: auto-fix lint & formatting [skip ci] 2026-08-27 14:00:26 +00:00
lib feat(check): add build log link for failed Cloudflare checks 2026-08-27 21:43:26 +08:00
observability chore: auto-fix lint & formatting [skip ci] 2026-08-16 14:47:01 +00:00
providers feat(reliability): idempotency store, custom webhook replay protection, correlation ids 2026-08-15 17:03:32 +08:00
queue feat(feishu): add Feishu inbound webhook, /gh commands and card actions 2026-08-27 00:07:05 +08:00
storage fix: prevent cascade deletion of routes when updating groups 2026-09-10 22:29:47 +08:00
web chore: auto-fix lint & formatting [skip ci] 2026-08-26 16:39:02 +00:00
cf.ts fix: read raw request + body via h3 context for discord/telegram webhooks 2026-08-13 18:13:55 +08:00
config.ts chore: auto-fix lint & formatting [skip ci] 2026-08-17 07:51:36 +00:00
fragments.ts chore: auto-fix lint & formatting [skip ci] 2026-08-24 14:52:59 +00:00
http.ts feat: migrate to Nuxt 4 (Nitro) and Tailwind CSS v3 2026-08-13 17:43:33 +08:00
types.ts feat(feishu): add Feishu inbound webhook, /gh commands and card actions 2026-08-27 00:07:05 +08:00
webhook.ts feat(storage): migrate config, dedup and delivery state to D1 2026-08-17 15:01:20 +08:00