Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Content: admin approval queue + Brevo decision emails (Phase 4.3, 8.3)

Aperta
#4 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
csharp, postgresql

Direzione di ricerca

Inizia leggendo i pattern dei moduli esistenti per IEndpointModule.MapEndpoints e l'uso di IEmailSender nell'e-mail di benvenuto, quindi esamina tests/CommunityPro.Tests/Members/MembersTestHarness.cs per la configurazione dei test. Implementa il workflow di amministrazione e il comportamento delle e-mail indicati quando #3 e #1 saranno disponibili, quindi verifica i criteri di accettazione, inclusa la copertura xUnit per l'emissione dell'evento esattamente una volta e gli errori e-mail non bloccanti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

admin content

Scope

Admin decision endpoints for the blog workflow, plus author notification emails.

Method Path Notes
GET /admin/posts?status=submitted approval queue, paginated, newest first
POST /admin/posts/{id}/approve Submitted → Published (immediately — no scheduling in v1); sets PublishedAt; publishes PostPublished domain event
POST /admin/posts/{id}/reject body requires reason; Submitted → Draft with RejectionReason
POST /admin/posts/{id}/feature set IsFeatured (clears previous)

Emails

On approve/reject, send the author a Brevo email with the decision (+ reason when rejected) via the existing IEmailSender abstraction (Identity module owns the SMTP relay — reuse the same best-effort, never-throw pattern as the welcome email).

Events

PostPublished (and PostUnpublished if unpublish is added later) are consumed by the search/revalidation ticket {{C3}} — this ticket only emits.

Error codes

content.not_found, content.invalid_state, content.rejection_reason_required

Dependencies

Blocked by #3 (submitted posts must exist) and #1 (admin policy + route group).

Acceptance criteria

  • Approve/reject only valid from Submitted; reason mandatory on reject
  • Approve sets PublishedAt and emits PostPublished exactly once
  • Email failures are logged, never fail the request
  • Feature clears the previously featured post
  • xUnit coverage incl. the event emission
Conventions (project-wide, non-negotiable)
  • .NET 9, records for immutable shapes, file-scoped namespaces, primary constructors where they read well. Minimal-API endpoints grouped per module via IEndpointModule.MapEndpoints.
  • Result<T> (SharedKernel) instead of exception-driven control flow. Endpoint results map failures to ProblemDetails with the stable error codes listed above — the frontend keys off them.
  • Module owns its EF Core DbContext mapped to its own Postgres schema. Modules never reference each other's internals — cross-module needs go through a public contract interface or an in-process domain event (IEventPublisher).
  • All external calls (GitHub, Stripe, Brevo, Cloudinary, Meilisearch) behind interfaces owned by the consuming module.
  • Every list endpoint paginated (offset is fine). xUnit tests in tests/CommunityPro.Tests/<Module>/ following the existing harness patterns (see Members/MembersTestHarness.cs).
Lingua principale
C#
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommunityPro/community-pro-api

Tutte le issue di CommunityPro/community-pro-api

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.