import { ApiCall } from "tsrpc";
import { ReqExit, ResExit } from "../../shared/protocols/gonghui/PtlExit";

export default async function (call: ApiCall<ReqExit, ResExit>) {

    if (call.conn.gud.ghLevel == 1) {
        return call.error(globalThis.lng.gonghui_9);
    }

    (await call.conn.gonghui).delPlayer(call.uid);

    call.succ({});
}