const postFunction = async (ctx) => { try { const {id} = ctx.req.body; const r = await ctx.db.getData(id); // This respond function is customizable in your middleware ctx.respond(200, r); } catch(err) { console.log(err); ctx.respond(500); } } module.exports = postFunction;