MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / getListStatus

Method getListStatus

packages/hydrooj/src/model/solution.ts:86–93  ·  view source on GitHub ↗
(domainId: string, psids: ObjectId[], uid: number)

Source from the content-addressed store, hash-verified

84 }
85
86 static async getListStatus(domainId: string, psids: ObjectId[], uid: number) {
87 const result: Record<string, { docId: ObjectId, vote: number }> = {};
88 const res = await document.getMultiStatus(
89 domainId, document.TYPE_PROBLEM_SOLUTION, { uid, docId: { $in: psids } },
90 ).project<any>({ docId: 1, vote: 1 }).toArray();
91 for (const i of res) result[i.docId] = i;
92 return result;
93 }
94}
95
96bus.on('problem/delete', async (domainId, docId) => {

Callers

nothing calls this directly

Calls 1

getMultiStatusMethod · 0.80

Tested by

no test coverage detected