Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Remove content status check
Browse files Browse the repository at this point in the history
  • Loading branch information
solocommand committed Jul 22, 2021
1 parent 3dd5907 commit 559d999
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,9 @@ module.exports = {

const { contentId, sectionId } = input;
const [content, section] = await Promise.all([
load('platformContent', contentId, { status: 1, published: 1, type: 1 }),
load('platformContent', contentId, { published: 1, type: 1 }),
basedb.strictFindOne('website.Section', { _id: sectionId }, { projection: { site: 1 } }),
]);
if (content.status !== 1) throw new UserInputError('The content status must be published.');

const startDate = input.startDate || content.published || new Date();
const siteId = BaseDB.extractRefId(section.site);
Expand Down

0 comments on commit 559d999

Please sign in to comment.