云函数 missing authoration key,缺少授权键?@官方
serverless云函数报错,求解?
const cloud = require('wx-server-sdk') // wx-server-sdk 2.3.2
cloud.init()
const db = cloud.database()
const resInfo = db.collection('resInfo')
exports.main_handler = async (event, context, callback) => {
return await resInfo.get().then(res => {
return res
})
}
数据库权限
{
"read": true,
"write": true
}
报错
errCode: -501007 invalid parameters | errMsg: collection.get:fail missing authoration key,
redeploy the function; at collection.get api;