16 lines
477 B
TypeScript
16 lines
477 B
TypeScript
import { ApiCall } from "tsrpc";
|
|
import { ReqMyRank, ResMyRank } from "../../shared/protocols/slzd/PtlMyRank";
|
|
|
|
export default async function (call: ApiCall<ReqMyRank, ResMyRank>) {
|
|
|
|
let arr = await G.mongodb.collection('slzdUser').find({ ghid: call.conn.gud.ghId }).toArray();
|
|
|
|
call.succ({
|
|
rankList: arr.map(a => {
|
|
return {
|
|
player: a.info.player,
|
|
valArr: [a.val, a.recordFightNum]
|
|
};
|
|
})
|
|
});
|
|
} |