UNPKG

@botonic/plugin-flow-builder

Version:

Use Flow Builder to show your contents

15 lines 605 B
import { __awaiter } from "tslib"; export function getContentsByPayload({ cmsApi, flowBuilderPlugin, request, contentID, }) { var _a; return __awaiter(this, void 0, void 0, function* () { const id = contentID ? (_a = cmsApi.getNodeByContentID(contentID)) === null || _a === void 0 ? void 0 : _a.id : request.input.payload; const targetNode = id ? cmsApi.getNodeById(id) : undefined; if (targetNode) { return yield flowBuilderPlugin.getContentsByNode(targetNode); } return []; }); } //# sourceMappingURL=payload.js.map