diff --git a/src/index.js b/src/index.js index 110bff45..477c4bd9 100644 --- a/src/index.js +++ b/src/index.js @@ -264,6 +264,7 @@ fastify.post("/api/login", { } } } + // Check for staff login const allUsers = await User.find({ "staff.staff": { $elemMatch: { phone } } }); diff --git a/src/models/User.js b/src/models/User.js index 5dce58ff..eab08b7a 100644 --- a/src/models/User.js +++ b/src/models/User.js @@ -44,6 +44,7 @@ const generateBookingId = async () => { + const userSchema = new mongoose.Schema( { installationId:{type:String},