Merge branch 'bugfix' into dev
This commit is contained in:
commit
48b07c2d74
@ -35,6 +35,7 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
|
|||||||
_mydata.lunci += 1
|
_mydata.lunci += 1
|
||||||
_setData["taskval"] = _mydata.taskval
|
_setData["taskval"] = _mydata.taskval
|
||||||
_setData["lunci"] = _mydata.lunci
|
_setData["lunci"] = _mydata.lunci
|
||||||
|
_setData["finishid"] = _mydata.finishid
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置任务改变数据
|
// 设置任务改变数据
|
||||||
|
@ -16,8 +16,8 @@ export default async function (call: ApiCall<ReqRec, ResRec>) {
|
|||||||
if (call.req.index > day) return call.errorCode(-3);
|
if (call.req.index > day) return call.errorCode(-3);
|
||||||
if (rec.includes(call.req.index)) return call.errorCode(-4);
|
if (rec.includes(call.req.index)) return call.errorCode(-4);
|
||||||
|
|
||||||
|
// 从异步改成同步
|
||||||
G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true});
|
await G.mongodb.cEvent(type).updateOne({uid: call.uid, type: type}, {$push: {rec: call.req.index}}, {upsert: true});
|
||||||
|
|
||||||
|
|
||||||
await PlayerFun.sendPrize(call, [].concat(conf.prize[call.req.index]));
|
await PlayerFun.sendPrize(call, [].concat(conf.prize[call.req.index]));
|
||||||
|
Loading…
Reference in New Issue
Block a user