populate fields on task creation

This commit is contained in:
2025-04-22 15:58:27 +05:30
parent 3b9cb59a05
commit ae287c799c
4 changed files with 70 additions and 67 deletions

View File

@@ -28,6 +28,10 @@ const userSchema = new mongoose.Schema({
type: String,
required: true,
},
defaultClient: {
type: mongoose.Types.ObjectId,
ref: "organization",
},
passKeys: [new mongoose.Schema({}, { _id: false, strict: false })],
challenge: new mongoose.Schema(
{
@@ -92,6 +96,7 @@ const updateUserInput = z.object({
.optional(),
avatar: z.string().url().optional(),
role: z.enum(roles).optional(),
defaultClient: z.string().optional(),
});
const userResponse = z.object({