RouteArticle API endpoints for approve/reject/restore #98

Closed
opened 2026-03-18 17:05:26 +01:00 by myrmidex · 0 comments
Owner

Summary

Add API endpoints for managing route_article approval status. The old POST /articles/{id}/approve and POST /articles/{id}/reject endpoints were removed in #85 since approval moved from Article to RouteArticle.

Endpoints needed

  • POST /api/v1/route-articles/{routeArticle}/approve — calls RouteArticle::approve(), dispatches RouteArticleApproved event
  • POST /api/v1/route-articles/{routeArticle}/reject — calls RouteArticle::reject()
  • POST /api/v1/route-articles/{routeArticle}/restore — sets status back to pending
  • POST /api/v1/route-articles/clear — bulk reject all pending route_articles (for "Clear" button in triage UI)
  • GET /api/v1/route-articles — list route_articles with filtering by approval_status, pagination

Tasks

  • Create RouteArticlesController with approve, reject, restore, clear, index methods
  • Create RouteArticleResource for API responses
  • Register routes in routes/api.php
  • Tests for all endpoints

Dependencies

  • Depends on #85 (Configurable article validation rules) — done
  • Required by #96 (Article triage UI)
## Summary Add API endpoints for managing route_article approval status. The old `POST /articles/{id}/approve` and `POST /articles/{id}/reject` endpoints were removed in #85 since approval moved from Article to RouteArticle. ## Endpoints needed - `POST /api/v1/route-articles/{routeArticle}/approve` — calls `RouteArticle::approve()`, dispatches `RouteArticleApproved` event - `POST /api/v1/route-articles/{routeArticle}/reject` — calls `RouteArticle::reject()` - `POST /api/v1/route-articles/{routeArticle}/restore` — sets status back to `pending` - `POST /api/v1/route-articles/clear` — bulk reject all pending route_articles (for "Clear" button in triage UI) - `GET /api/v1/route-articles` — list route_articles with filtering by `approval_status`, pagination ## Tasks - [ ] Create `RouteArticlesController` with approve, reject, restore, clear, index methods - [ ] Create `RouteArticleResource` for API responses - [ ] Register routes in `routes/api.php` - [ ] Tests for all endpoints ## Dependencies - Depends on #85 (Configurable article validation rules) — ✅ done - Required by #96 (Article triage UI)
myrmidex added this to the v1.3.0 milestone 2026-03-18 17:05:26 +01:00
myrmidex added the
enhancement
label 2026-03-18 17:05:26 +01:00
myrmidex self-assigned this 2026-03-18 17:08:51 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lvl0/fedi-feed-router#98
No description provided.