ui: rating history

This commit is contained in:
undefined committed 2021-05-16 01:02:52 +08:00
1 parent a532f3d7a6
commit 256ff96c57
8 files changed
+86 -7

No files matched your search

+6
View File
@@ -205,6 +205,12 @@ class DomainModel {
return await collUser.updateOne({ domainId, uid }, { $set: params }, { upsert: true });
}
static async updateUserInDomain(domainId: string, uid: number, update: any) {
const udoc = await UserModel.getById(domainId, uid);
deleteUserCache(udoc);
return await collUser.updateOne({ domainId, uid }, update, { upsert: true });
}
@ArgMethod
static async incUserInDomain(domainId: string, uid: number, field: string, n: number = 1) {
// @ts-ignore