后台添加修改密码、编辑、记录等功能
This commit is contained in:
@@ -32,6 +32,11 @@ export default class GMGroup extends BaseModel {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async editGroup(groupId: number, group: string, name: string, desc: string, lean = true) {
|
||||
const result = await GMGroupModel.findOneAndUpdate({ id: groupId }, {$set: {group, desc, name}}).select('uid username name').lean(lean);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async getAllGroup(lean = true) {
|
||||
const list = await GMGroupModel.find().lean(lean);
|
||||
return list;
|
||||
|
||||
Reference in New Issue
Block a user