Kyc approved then RD create and mail send
This commit is contained in:
parent
c07f44b149
commit
2909fafa18
@ -54,7 +54,6 @@ const salescoordinatorSchema = new mongoose.Schema(
|
|||||||
},
|
},
|
||||||
fcm_token: {
|
fcm_token: {
|
||||||
type: String,
|
type: String,
|
||||||
unique: true,
|
|
||||||
},
|
},
|
||||||
mappedby: {
|
mappedby: {
|
||||||
type: mongoose.Schema.Types.ObjectId,
|
type: mongoose.Schema.Types.ObjectId,
|
||||||
|
@ -54,7 +54,6 @@ const territorymanagerSchema = new mongoose.Schema(
|
|||||||
},
|
},
|
||||||
fcm_token: {
|
fcm_token: {
|
||||||
type: String,
|
type: String,
|
||||||
unique: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ timestamps: true }
|
{ timestamps: true }
|
||||||
|
@ -1169,7 +1169,7 @@ export const mappedbyTM = catchAsyncErrors(async (req, res, next) => {
|
|||||||
export const mappedbySC = catchAsyncErrors(async (req, res, next) => {
|
export const mappedbySC = catchAsyncErrors(async (req, res, next) => {
|
||||||
const { id } = req.params; // SalesCoOrdinator ID from URL parameters
|
const { id } = req.params; // SalesCoOrdinator ID from URL parameters
|
||||||
const { mappedbySC } = req.body; // TerritoryManager ID from request body
|
const { mappedbySC } = req.body; // TerritoryManager ID from request body
|
||||||
// console.log(id, mappedby);
|
// console.log(id, mappedbySC);
|
||||||
// Validate that the TerritoryManager ID is provided
|
// Validate that the TerritoryManager ID is provided
|
||||||
if (!mappedbySC) {
|
if (!mappedbySC) {
|
||||||
return res.status(400).json({
|
return res.status(400).json({
|
||||||
|
Loading…
Reference in New Issue
Block a user