mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
🐛 fix ban schema
This commit is contained in:
parent
67f94fb015
commit
89acd570e5
@ -20,11 +20,13 @@ export const BanSchema = new Schema({
|
||||
|
||||
BanSchema.virtual("user", {
|
||||
ref: UserModel,
|
||||
localField: "id",
|
||||
foreignField: "user_id",
|
||||
localField: "user_id",
|
||||
foreignField: "id",
|
||||
justOne: true,
|
||||
autopopulate: { select: PublicUserProjection },
|
||||
});
|
||||
|
||||
BanSchema.set("removeResponse", ["user_id"]);
|
||||
|
||||
// @ts-ignore
|
||||
export const BanModel = db.model<Ban>("Ban", BanSchema, "bans");
|
||||
|
Loading…
Reference in New Issue
Block a user