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

Method get

packages/hydrooj/src/handler/user.ts:379–385  ·  view source on GitHub ↗
({ domainId, code })

Source from the content-addressed store, hash-verified

377 noCheckPermView = true;
378
379 async get({ domainId, code }) {
380 const tdoc = await token.get(code, token.TYPE_LOSTPASS);
381 if (!tdoc) throw new InvalidTokenError(token.TYPE_TEXTS[token.TYPE_LOSTPASS], code);
382 const udoc = await user.getById(domainId, tdoc.uid);
383 this.response.body = { uname: udoc.uname };
384 this.response.template = 'user_lostpass_with_code.html';
385 }
386
387 @param('code', Types.String)
388 @param('password', Types.Password)

Callers

nothing calls this directly

Calls 2

getByIdMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected