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

Method updateUserInDomain

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

Source from the content-addressed store, hash-verified

264 }
265
266 static async updateUserInDomain(domainId: string, uid: number, update: any) {
267 const udoc = await UserModel.getById(domainId, uid);
268 deleteUserCache(udoc);
269 return await collUser.updateOne({ domainId, uid }, update, { upsert: true });
270 }
271
272 @ArgMethod
273 static async incUserInDomain(domainId: string, uid: number, field: string, n: number = 1) {

Callers 1

setJoinMethod · 0.80

Calls 2

deleteUserCacheFunction · 0.90
getByIdMethod · 0.80

Tested by

no test coverage detected