Skip to content

fix(posts): embed author via profiles_public so staff can load the feed#238

Merged
Azfe merged 1 commit into
developfrom
fix/feed-author-embed-profiles-public
Jul 11, 2026
Merged

fix(posts): embed author via profiles_public so staff can load the feed#238
Azfe merged 1 commit into
developfrom
fix/feed-author-embed-profiles-public

Conversation

@Azfe

@Azfe Azfe commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

The profiles RLS hardening (20260703000000) restricted SELECT to own row for staff, but listPublishedPosts and getPostById still embedded profiles!author_id directly. For staff every post came back with author: null, and PostCard / the post detail read post.author.name unguarded — the render threw and the Tablón never painted.

Embed the author through the profiles_public view (same path already used by lib/comments.ts), mark author as nullable and access it defensively so an orphaned author renders "—" instead of crashing the screen.

@Azfe
Azfe merged commit 0593d69 into develop Jul 11, 2026
6 checks passed
@Azfe
Azfe deleted the fix/feed-author-embed-profiles-public branch July 11, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant