import { ApiCall } from "tsrpc";
import { ReqcatFightLog, RescatFightLog } from "../../cross/protocols/wzry/PtlcatFightLog";

export default async function (call: ApiCall<ReqcatFightLog, RescatFightLog>) {
    let result = await G.mongodb.collection('wzry_fight_log').findOne({ _id: G.mongodb.conversionId(call.req.fid) });
    if (!result) {
        return call.errorCode(-1);
    }
    delete result._id;
    call.succ({ result: result });
}