Commit Graph
24 Commits
Author SHA1 Message Date
Francis Cao b7084bb90a Merge branch 'dev' into fix/delete-cascade 2026-05-07 13:58:29 -07:00
Francis Cao 5ccfb6d0a5 implement datatable sorting on non-analytics tables. (website/board/link/pixel/team/admin) 2026-05-07 10:46:03 -07:00
Stanislaw 71ee000f21 fix: avoid restamping deletedAt + skip Redis DEL for already-soft-deleted slugs
Address Greptile review feedback on #4243.

- Cloud-mode link.updateMany / pixel.updateMany now filter where: { ..., deletedAt: null } so a previously soft-deleted row keeps its original deletion timestamp instead of being restamped with the current time.
- Pre-transaction findMany now selects deletedAt; the Redis invalidation list filters to only live slugs, avoiding harmless but wasted DEL calls for already-soft-deleted entries.

Note: the share.deleteMany cleanup still uses the broad entityId list (not filtered by deletedAt) so that orphan share rows of already-soft-deleted links/pixels are still cleaned up. Filtering the prefetch itself, as Greptile's exact suggestion proposed, would skip those shares while link.deleteMany still hard-deletes the rows, leaving orphan share rows behind. Verified empirically with a 3-scenario reproduction.
2026-05-07 04:14:38 +02:00
Stanislaw a57abbe039 fix: clean up link, pixel, board rows on user/team deletion
deleteUser and deleteTeam left link/pixel/board rows (and their share rows)
in the database after the owner was removed. /q/<slug> and /p/<slug>
also kept serving deleted entries because the routes did not filter
deletedAt and Redis cached lookups for 24h.

- deleteUser: clean up link/pixel/board + shares for the deleted user.
  Cloud mode: soft-delete link/pixel, hard-delete board, only userId-owned.
  Non-cloud: hard-delete everything matching userId or owned teamIds.
- deleteTeam: same cleanup, scoped to teamId.
- /q and /p route handlers: filter deletedAt: null at the call sites
  (not in findLink/findPixel helpers, which would null-deref the
  permission checks at src/permissions/link.ts and pixel.ts).
- Post-transaction Redis invalidation mirrors deleteWebsite.
2026-05-07 03:37:22 +02:00
Francis Cao 54d3c43300 Revert "Merge pull request #4048 from AlejandroGispert/fix/3981-login-email-case"
This reverts commit b6341596bf, reversing
changes made to 07356323c1.
2026-04-07 11:26:58 -07:00
Alejandro Gispert 60c0915aa5 Merge branch 'dev' into fix/3981-login-email-case 2026-02-22 08:01:26 +01:00
Alejandro Gispert 2ab58700b2 fix: make signin email case-insensitive
Closes #3981
2026-02-22 07:18:00 +01:00
Francis Cao 8b2196b97a fix showDeleted reversed logic. Show non-deleted user as default query 2026-01-22 11:18:14 -08:00
Mike Cao fa8d8055df Reformatted files with biome. 2025-11-22 22:42:42 -08:00
Mike Cao f70f98fed0 Updated replica handling. Fixed types. 2025-10-03 01:20:48 -07:00
Francis Cao f11773ad3f fix user delete and Logo import 2025-09-24 16:44:58 -07:00
Mike Cao f40e1b44f3 Updates for cloud mode. 2025-09-04 20:27:42 -07:00
Mike Cao 56af91950a Updated components build. 2025-09-01 15:59:06 -07:00
Mike Cao d130242a0a Pixel editing. 2025-08-15 13:04:13 -07:00
Mike Cao bf6c9395c6 Revert Prisma build. 2025-07-12 15:18:01 -07:00
Mike Cao ee6c68d27c Refactor filter handling for queries. 2025-07-02 01:44:12 -07:00
Mike Cao 543674c7f2 Updated hooks. Changed url, host to path, hostname. 2025-06-20 22:35:02 -07:00
Mike Cao a1654e88af Update CI. 2025-06-18 22:46:05 -07:00
Mike Cao 49bcbfd7f9 New goals page. Upgraded prisma. 2025-05-31 02:11:18 -07:00
Mike Cao 7bb89b28be Removed getMessage from errors. 2025-02-19 19:11:11 -08:00
Mike Cao 8525188e42 Changed import path. 2025-02-05 15:59:59 -08:00
Mike Cao 113022ed17 Imported libraries, removed next-basics. 2025-02-05 13:30:28 -08:00
Francis Cao 13c7dd6aa8 add cascading delete to sessionData 2024-08-27 21:33:46 -07:00
Mike Cao db36c37d32 Updated session and events queries. Added sessions page. 2024-07-08 01:45:54 -07:00