diff --git a/shared/db/Guild.ts b/shared/db/Guild.ts index 9b7be56ae..34abc1926 100644 --- a/shared/db/Guild.ts +++ b/shared/db/Guild.ts @@ -192,7 +192,7 @@ export default class Guild extends BaseModel { } public static async updateCe(roleId: string, inc: number ) { - const result = await GuildModel.findOneAndUpdate({ members: { $elemMatch: [roleId] }, status: GUILD_STATUS.RUNNING}, {$inc: {guildCe: inc}}, {new: true}).lean(); + const result = await GuildModel.findOneAndUpdate({ members: { $elemMatch: { $eq: roleId } }, status: GUILD_STATUS.RUNNING}, {$inc: {guildCe: inc}}, {new: true}).lean(); return result; }