We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I have a (probably niche) use case - I need to set publication date of an entity within my own plugin's service.
I don't understand how to do that. I figured out that if I want to publish or un-publish an entity, I can just utilize publish service like so:
publish
const QUIZ = 'plugin::quiz.quiz'; export default ({ strapi }: { strapi: Strapi }) => ({ saveQuiz: withTryCatch(async (body: any): Promise<ServiceResponse<any>> => { const { quiz }: { quiz: Quiz } = body; const { publish } = strapi.plugin('publisher').service('publicationService'); // Save the quiz const savedQuiz = await strapi.entityService!.create(QUIZ, { data: quiz }); // Publish the quiz await publish(QUIZ, savedQuiz.id); // ... }), });
But I've been browsing the code and I still can't figure it out.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I have a (probably niche) use case - I need to set publication date of an entity within my own plugin's service.
I don't understand how to do that. I figured out that if I want to publish or un-publish an entity, I can just utilize
publish
service like so:But I've been browsing the code and I still can't figure it out.
The text was updated successfully, but these errors were encountered: