Skip to content

Publisher and RSS

Publishers are a separate user type from admins. They have limited dashboard access focused on managing their RSS feed.

Method Path Access Purpose
POST /api/v1/publisher Admin Create a publisher account
GET /api/v1/publisher Admin List all publishers
GET /api/v1/publisher/:id Admin Get publisher detail
PUT /api/v1/publisher/:id Admin Update publisher
DELETE /api/v1/publisher/:id Admin Delete publisher
PUT /api/v1/publisher/:id/approve Admin Approve publisher for RSS polling
PUT /api/v1/publisher/:id/disable Admin Disable publisher
GET /api/v1/publisher/me Publisher Get own publisher record
PUT /api/v1/publisher/me/feed Publisher Save RSS feed URL and default tags
POST /api/v1/publisher/me/test-feed Publisher Preview feed items before saving
GET /api/v1/publisher/reports/monthly Admin Monthly article report per publisher

The cron job runs every hour (0 * * * *). It calls fetchAllFeeds() which:

  1. Queries all publishers with status: approved
  2. Fetches each publisher’s RSS feed URL using rss-parser
  3. For each feed item, checks if an article with the same rssFeedGuid already exists
  4. If not, saves it as a new article with the publisher’s source attribution
// Deduplication check
const exists = await Article.findOne({ rssFeedGuid: item.guid });
if (exists) continue; // skip — already imported
FieldValue
isAggregatedtrue
sourcePublisher’s display name
sourceUrlOriginal article URL
publisherObjectId reference to the Publisher record
rssFeedGuidUnique identifier from the feed item (guid or link)