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

Method get

packages/hydrooj/src/handler/user.ts:148–153  ·  view source on GitHub ↗
({ }, q: string)

Source from the content-addressed store, hash-verified

146
147 @param('q', Types.String)
148 async get({ }, q: string) {
149 let udoc = await user.getByUname('system', q);
150 udoc ||= await user.getByEmail('system', q);
151 if (!udoc) this.response.body = { tfa: false, authn: false };
152 else this.response.body = { tfa: udoc.tfa, authn: udoc.authn };
153 }
154}
155
156class UserWebauthnHandler extends Handler {

Callers

nothing calls this directly

Calls 2

getByUnameMethod · 0.80
getByEmailMethod · 0.80

Tested by

no test coverage detected