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

Method get

packages/hydrooj/src/handler/manage.ts:319–332  ·  view source on GitHub ↗
({ }, extraIgnore: number[] = [])

Source from the content-addressed store, hash-verified

317 @requireSudo
318 @param('extraIgnore', Types.NumericArray, true)
319 async get({ }, extraIgnore: number[] = []) {
320 const defaultPriv = system.get('default.priv');
321 const udocs = await user.getMulti({
322 _id: { $gte: -1000, $ne: 1 }, priv: { $nin: [0, defaultPriv, ...extraIgnore] },
323 }).limit(1000).sort({ _id: 1 }).toArray();
324 const banudocs = await user.getMulti({ _id: { $gte: -1000, $ne: 1 }, priv: 0 }).limit(1000).sort({ _id: 1 }).toArray();
325 this.response.body = {
326 udocs: [...udocs, ...banudocs],
327 defaultPriv,
328 Priv,
329 };
330 this.response.pjax = 'partials/manage_user_priv.html';
331 this.response.template = 'manage_user_priv.html';
332 }
333
334 @requireSudo
335 @param('uid', Types.Int)

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
getMultiMethod · 0.45

Tested by

no test coverage detected