后台:邮件
This commit is contained in:
@@ -87,6 +87,11 @@ export default class Serverlist extends BaseModel {
|
||||
return server;
|
||||
}
|
||||
|
||||
public static async findByServerIds(serverIds: number[]) {
|
||||
let servers: ServerlistType[] = await ServerlistModel.find({ id: { $in: serverIds } }).select('medianCe activityGroupId').lean({ getters: true, virtuals: true });
|
||||
return servers;
|
||||
}
|
||||
|
||||
public static async updateByServerId(serverId: number, update: ServerlistUpdate) {
|
||||
let server: ServerlistType = await ServerlistModel.findOneAndUpdate({ id: serverId }, { $set: update }).lean({ getters: true, virtuals: true });
|
||||
return server;
|
||||
|
||||
Reference in New Issue
Block a user