重构了云函数

This commit is contained in:
walkpan
2025-10-19 20:10:19 +08:00
parent cfb6819bc7
commit 1c40c10210
1942 changed files with 363888 additions and 435 deletions

View File

@@ -48,8 +48,13 @@ exports.main = async (event, context) => {
msg: `Save fail, ${JSON.stringify(saveDataRes)}`
};
}
}else if (event?.cmd === "get") {
let user = await getOrCreaterUser(db, wxContext.OPENID);
return {
code: 200,
data: user,
};
}
return {
code: -2,
msg: `Unknow cmd: ${event?.cmd}`,