🎨 rename recipients -> recipient_ids

This commit is contained in:
Flam3rboy committed 2021-05-31 20:32:50 +02:00
1 parent 24a7accc16
commit 0713f89bba
2 files changed
+9 -6

No files matched your search

+4 -1
View File
@@ -5,7 +5,7 @@ import { UserModel } from "./User";
// @ts-ignore
export interface AnyChannel extends Channel, DMChannel, TextChannel, VoiceChannel {
recipients: null | string[];
recipient_ids: null | string[];
}
export interface ChannelDocument extends Document, AnyChannel {
@@ -44,6 +44,9 @@ ChannelSchema.virtual("recipients", {
justOne: false,
autopopulate: true,
});
ChannelSchema.set("removeResponse", ["recipient_ids"]);
// @ts-ignore
export const ChannelModel = db.model<ChannelDocument>("Channel", ChannelSchema, "channels");