Conversation
Backs the new frontend /admin/blog CMS (opportunity-hack/frontend-ohack.dev#293). The existing public POST /api/messages/news with X-Api-Key auth is untouched so the Slack integration keeps working. - New routes under /api/messages/admin/news (all gated with volunteer.admin via auth.require_org_member_with_permission): - GET /admin/news?limit=&status= — admin list, includes drafts - POST /admin/news — create (default status=draft, skips OpenAI image-gen when featured_image supplied) - PATCH /admin/news/<id> — partial update (allowlisted fields only, clears get_news cache) - DELETE /admin/news/<id> — hard delete - services/news_service.py adds admin_create_news, admin_update_news, admin_delete_news, admin_list_news plus _ADMIN_ALLOWED_KEYS allowlist and _is_publicly_visible filter so the public get_news drops status=draft|archived (over-fetches 3x to keep the post-filter count). - common/utils/firebase.py adds update_news_partial, delete_news, and get_all_news_admin. New optional fields on a news doc (all optional, legacy docs unchanged): content_markdown, content_format, featured_image, author, tags, slug, status, published_at, seo{}, last_updated_by, created_by. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…-3ca3eb-blog-admin [Blog] Admin-gated CRUD routes for /news
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.