javascript - Strapi.io Controller.find().exec(...) -
i try use controller.find().exec(...) method , under exec callback function try create body content. have no idea should do. think have use yield keyword there drops error if try use yield in callback function. code looks this:
let value; firstcontroller.find().exec(function (error, result) { value = yield result; }); this.body = value;
i tried yield , without, let , without. , of options. please let me share if have idea. have use exec because have use result , pass different find method.
please try this:
// retrieve value const value = yield firstcontroller.find(); // set value body this.body = value;
Comments
Post a Comment