import { ApiCall } from "tsrpc";
import { ReqGetStatus, ResGetStatus } from "../../../cross/protocols/hbzb/zbs/PtlGetStatus";
import { Rank } from '../../../public/rank/rank';

export default async function (call: ApiCall<ReqGetStatus, ResGetStatus>) {
    let myData = await G.mongodb.collection("hbzb_user_cross").findOne({uid:call.req.uid});
    if(!myData || !myData.rank){
        return call.succ({ status: -999999});
    }
    call.succ({ status: (myData?.rank)});
}