import { ApiCall } from "tsrpc";
import { ReqBaoMing, ResBaoMing } from "../../cross/protocols/wzry/PtlBaoMing";

export default async function (call: ApiCall<ReqBaoMing, ResBaoMing>) {
    let _setData = {
        zkey: call.req.zkey,
        data: call.req.data,
        jifen: 0,
        uid: call.req.data.player.uid
    }
    await G.mongodb.collection('wzry_user_cross').updateOne({ uid: call.req.data.player.uid }, { $set: _setData }, { upsert: true })
    call.succ({ mydata: _setData });
}