I have an Area Document
// An interface that descripbe the properties
// that a Area document has
interface AreaDoc extends mongoose.Document {
code: string;
description: string;
isActive: boolean;
createdBy: UserDoc;
createdAt: Date;
modifiedAt: Date;
}
Trying to use createdBy (interface UserDoc extends mongoose.Document) to find an area.
I know that this issue is because the const createdBy = req.currentUser!.id; returns a string value.
Any idea how i can resolve this
