Skip to content

feat(38): editorial candidates admin page#53

Merged
cocoyoon merged 2 commits into
mainfrom
feat/38-editorial-candidates-admin
Apr 2, 2026
Merged

feat(38): editorial candidates admin page#53
cocoyoon merged 2 commits into
mainfrom
feat/38-editorial-candidates-admin

Conversation

@cocoyoon
Copy link
Copy Markdown
Member

@cocoyoon cocoyoon commented Apr 2, 2026

Summary

  • Admin 페이지에서 editorial 승격 가능한 post 목록 조회 및 수동 트리거 기능 추가
  • 적격 기준: spot ≥ 4개, 각 spot에 solution ≥ 1개, magazine 미연결
  • 기존 generate_post_magazine API를 그대로 재사용하여 editorial 생성

Changes

Backend (Rust api-server)

  • GET /api/v1/admin/editorial-candidates — 적격 post 목록 조회 API + unit test 5개
  • Admin auth/middleware 적용

Frontend (Next.js web)

  • /admin/editorial-candidates 페이지 (테이블 + 페이지네이션 + Generate 버튼)
  • POST /api/v1/post-magazines/generate proxy route
  • React Query hooks (useEditorialCandidates, useGenerateEditorial)
  • 사이드바에 "Editorial" 메뉴 추가

Test plan

  • cargo test -p decoded-api -- "domains::admin::editorial_candidates" 통과 (5/5)
  • /admin/editorial-candidates 페이지 접속 후 적격 post 목록 확인
  • "Generate" 버튼 클릭 → post_magazines 레코드 생성 확인
  • 생성 후 해당 post가 목록에서 사라지는지 확인
  • /editorial 페이지에서 생성된 editorial 노출 확인

Closes #38

🤖 Generated with Claude Code

cocoyoon and others added 2 commits April 2, 2026 14:08
Admin page to view posts eligible for editorial promotion (≥4 spots, each
with ≥1 solution) and trigger editorial generation via existing pipeline.

Closes #38

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JWT claim-based admin_middleware doesn't work with Supabase
authenticated tokens (role is always "authenticated"). Switch to
admin_db_middleware which checks users.is_admin in DB, matching
the magazine_sessions pattern.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cocoyoon cocoyoon merged commit 706417a into main Apr 2, 2026
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.

feat(editorial): Post Editorial 자동화 파이프라인

1 participant