删除iaa逻辑
This commit is contained in:
parent
d635bb4326
commit
1dd0e9f23d
|
|
@ -10,8 +10,7 @@ export default async function (ctx: FunctionContext) {
|
|||
const uid = body.uid;
|
||||
if (!uid) return { code: 0, data: null, msg: "未获取到uid" };
|
||||
|
||||
const dbname = body.gameName === "iaa" ? "usersAd" : "users";
|
||||
const result = await db.collection(dbname).where({ _id: uid }).getOne();
|
||||
const result = await db.collection("users").where({ _id: uid }).getOne();
|
||||
const user = result.data;
|
||||
if (!user) return { code: 0, data: null, msg: "未获取到用户信息" };
|
||||
if (user.token && !Utils.checkToken(body.token, user.token)) {
|
||||
|
|
@ -20,10 +19,10 @@ export default async function (ctx: FunctionContext) {
|
|||
if (user.isDebug !== true && user.isDebug !== "true") {
|
||||
return { code: 403, data: null, msg: "仅调试账号可调用" };
|
||||
}
|
||||
const debugKey = process.env.DAILY_TASK_DEBUG_KEY;
|
||||
if (!debugKey || body.debugKey !== debugKey) {
|
||||
return { code: 403, data: null, msg: "调试密钥校验失败" };
|
||||
}
|
||||
// const debugKey = process.env.DAILY_TASK_DEBUG_KEY;
|
||||
// if (!debugKey || body.debugKey !== debugKey) {
|
||||
// return { code: 403, data: null, msg: "调试密钥校验失败" };
|
||||
// }
|
||||
|
||||
const level = Number(user.levelAmount) + 1 || 1;
|
||||
let task = refreshTaskData(user.task, uid, level).data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user