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

Method setUserInDomain

packages/hydrooj/src/model/domain.ts:260–264  ·  view source on GitHub ↗
(domainId: string, uid: number, params: any)

Source from the content-addressed store, hash-verified

258 }
259
260 static async setUserInDomain(domainId: string, uid: number, params: any) {
261 const udoc = await UserModel.getById(domainId, uid);
262 deleteUserCache(udoc);
263 return await collUser.updateOne({ domainId, uid }, { $set: params }, { upsert: true });
264 }
265
266 static async updateUserInDomain(domainId: string, uid: number, update: any) {
267 const udoc = await UserModel.getById(domainId, uid);

Callers 11

applyFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
runFunction · 0.80
incUserInDomainMethod · 0.80
postMethod · 0.80
postMethod · 0.80
postMethod · 0.80
postMethod · 0.80

Calls 2

deleteUserCacheFunction · 0.90
getByIdMethod · 0.80

Tested by

no test coverage detected