军团:邀请过一次当天不再显示
This commit is contained in:
@@ -27,7 +27,7 @@ export default class GuildRec extends BaseModel {
|
||||
|
||||
public static async createGuildRec(roleId: string, guildCode: string, type: number, params: string[]) {
|
||||
const doc = new GuildRecModel();
|
||||
const update = Object.assign(doc.toJSON(), { roleId, guildCode, type, params });
|
||||
const update = Object.assign(doc.toJSON(), { roleId, guildCode, type, params, createTime: nowSeconds() });
|
||||
delete update._id;
|
||||
const recCode = genCode(10);
|
||||
const result: GuildRecType = await GuildRecModel.findOneAndUpdate({ recCode }, update, { upsert: true, new: true }).lean();
|
||||
|
||||
Reference in New Issue
Block a user