import { ApiCall } from "tsrpc";
import { GHManage } from '../../public/gonghui/manage';
import { ReqDissolve, ResDissolve } from "../../shared/protocols/gonghui/PtlDissolve";

export default async function (call: ApiCall<ReqDissolve, ResDissolve>) {

    if (call.conn.gud.ghLevel != 1) return call.error(globalThis.lng.gonghui_8);

    GHManage.remove(call.conn.gud.ghId);

    call.succ({});
}