云函数日志中 同一个变量 log显示正常 返回null?
发布于 6 年前 作者 yejie 153 次浏览 来自 官方Issues
const fly = require('flyio')
 
exports.main = (event, context) => {
  fly.get('https://cnodejs.org/api/v1/topics', {
    page: 1,
    tab: '',
    limit: 5,
    mdrender: false
  })
    .then(function (response) {
      console.log(response.data)
      return response.data
    })
    .catch(function (error) {
      console.log(error.data)
      return error.data
    })
}
1 回复

签名少了 return

回到顶部