Jean-Sébastien Herbaux c4716d5668 [D&P] Return published content by default from get apis (#7657)
* Add _publicationState request param / Returns live by default for CT that have D&P activated

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-09-22 17:39:46 +02:00

15 lines
333 B
JavaScript

'use strict';
const {
contentTypes: {
constants: { PUBLISHED_AT_ATTRIBUTE, DP_PUB_STATE_LIVE, DP_PUB_STATE_PREVIEW },
},
} = require('strapi-utils');
module.exports = {
publicationState: {
[DP_PUB_STATE_LIVE]: { [PUBLISHED_AT_ATTRIBUTE]: { $ne: null, $exists: true } },
[DP_PUB_STATE_PREVIEW]: undefined,
},
};