import { ApiCall } from "tsrpc";
import { ReqGetUser, ResGetUser } from "../../cross/protocols/kbzz/PtlGetUser";

export default async function (call: ApiCall<ReqGetUser, ResGetUser>) {

    let dbData = await G.mongodb.collection('kbzzGroupUser').findOne({ uid: call.req.uid });

    call.succ({
        group: dbData.group,
        troop: dbData.troop
    });
}