批量删除云函数为什么删除不成功?
控制台提示:
{errMsg: "cloud.callFunction:ok", result: {…}, requestID: "d86acf1f-5d4e-11ea-88b1-5254003e0a60"}
errMsg: "cloud.callFunction:ok"
requestID: "d86acf1f-5d4e-11ea-88b1-5254003e0a60"
result:
errMsg: "collection.remove:ok"
stats:
removed: 0
__proto__: Object
__proto__: Object
批量删除云函数:
const cloud = require("wx-server-sdk")
cloud.init()
const db = cloud.database();
// 云函数入口函数
exports.main = async(event, context) => {
try {
return await db.collection('user').where({
name: 'jack'
}).remove();
} catch (e) {
console.error(e);
}
}