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

Method get

packages/hydrooj/src/handler/domain.ts:366–382  ·  view source on GitHub ↗
({ domainId }, code: string, target: string = domainId, redirect: string = '')

Source from the content-addressed store, hash-verified

364 @param('target', Types.DomainId, true)
365 @param('redirect', Types.Content, true)
366 async get({ domainId }, code: string, target: string = domainId, redirect: string = '') {
367 this.response.template = 'domain_join.html';
368 const ddoc = await domain.get(target);
369 const domainInfo = {
370 name: ddoc.name,
371 owner: await user.getById(domainId, ddoc.owner),
372 avatar: ddoc.avatar,
373 bulletin: ddoc.showBulletin ? ddoc.bulletin : '',
374 };
375 this.response.body = {
376 joinSettings: this.joinSettings,
377 code,
378 redirect,
379 target,
380 domainInfo,
381 };
382 }
383
384 @param('code', Types.Content, true)
385 @param('target', Types.DomainId, true)

Callers

nothing calls this directly

Calls 2

getByIdMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected