UNPKG

datadirect

Version:
24 lines (23 loc) 839 B
import * as Endpoint from '../../../../Endpoint.js'; export function discussionThread() { return (payload, base) => { const { format, contentIndexId = null, viewDate = null, topicIndexId = null } = payload; if (!topicIndexId) { throw new Error('topicIndexId must be set (usually to topic.TopicIndexId'); } if (!contentIndexId) { throw new Error('contentIndexId must be set (usually to topic.TopicIndexID('); } return Endpoint.prepare({ payload: { format, contentIndexId, viewDate, topicIndexId, contentId: 386 // TODO weird that this seems to be hard-coded }, base, path: '/api/discussionitem/discussionitemsget/' }); }; }