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

Method getFields

packages/hydrooj/src/model/user.ts:165–168  ·  view source on GitHub ↗
(type: 'public' | 'private' = 'public')

Source from the content-addressed store, hash-verified

163 }
164
165 getFields(type: 'public' | 'private' = 'public') {
166 const fields = ['_id', 'uname', 'mail', 'perm', 'role', 'priv', 'regat', 'loginat', 'avatar', 'avatarUrl'].concat(this._publicFields);
167 return type === 'public' ? fields : fields.concat(this._privateFields);
168 }
169
170 serialize(h?) {
171 if (this._isPrivate) {

Callers 2

serializeMethod · 0.95
getListForRenderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected