server/laf-cloud/functions/clearSrank.ts
2026-09-01 16:04:15 +08:00

11 lines
554 B
TypeScript

import cloud from '@lafjs/cloud'
const db = cloud.database();
export default async function (ctx: FunctionContext) {
await db.collection("sRank").where({ _id: "69fabd35b4d89b170da4bf5e" }).update({ total: null });
await db.collection("users").update({ levelTJ: 0, addLevel: 0 }, { multi: true });
await db.collection("usersAd").update({ levelTJ: 0, addLevel: 0 }, { multi: true });
await db.collection("sRank").where({ _id: "69fabd35b4d89b170da4bf5e" }).update({ total: null });
cloud.shared.set("iosOrder", {});
return { data: 'hi, laf' }
}