Kyc approved then RD create and mail send

This commit is contained in:
Sibunnayak 2024-09-09 16:59:06 +05:30
parent c07f44b149
commit 2909fafa18
3 changed files with 1 additions and 3 deletions

View File

@ -54,7 +54,6 @@ const salescoordinatorSchema = new mongoose.Schema(
},
fcm_token: {
type: String,
unique: true,
},
mappedby: {
type: mongoose.Schema.Types.ObjectId,

View File

@ -54,7 +54,6 @@ const territorymanagerSchema = new mongoose.Schema(
},
fcm_token: {
type: String,
unique: true,
},
},
{ timestamps: true }

View File

@ -1169,7 +1169,7 @@ export const mappedbyTM = catchAsyncErrors(async (req, res, next) => {
export const mappedbySC = catchAsyncErrors(async (req, res, next) => {
const { id } = req.params; // SalesCoOrdinator ID from URL parameters
const { mappedbySC } = req.body; // TerritoryManager ID from request body
// console.log(id, mappedby);
// console.log(id, mappedbySC);
// Validate that the TerritoryManager ID is provided
if (!mappedbySC) {
return res.status(400).json({