mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-31 07:15:42 +00:00
🐛 fix ban schema
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user