feat(slates/create): add hydrateViewer param

This commit is contained in:
Aminejv 2021-10-27 16:15:28 +01:00
parent f0aa203d0b
commit c2dc502f84

View File

@ -40,7 +40,8 @@ export default async (req, res) => {
return res.status(500).send({ decorator: "SERVER_CREATE_SLATE_FAILED", error: true });
}
ViewerManager.hydratePartial(id, { slates: true });
const { hydrateViewer = true } = req.body.data;
if (hydrateViewer) ViewerManager.hydratePartial(id, { slates: true });
SearchManager.indexSlate(slate);