|
|
|
@ -32,7 +32,7 @@ const generateTeamMemberId = async () => {
|
|
|
|
|
exports.createTeamMember = async (req, reply) => {
|
|
|
|
|
try {
|
|
|
|
|
const { adminId } = req.params;
|
|
|
|
|
const { departmentId, departmentName, firstName, phone, password, email, alternativePhone, status ,officeName,city} = req.body;
|
|
|
|
|
const { departmentId, firstName, phone, password, email, alternativePhone, status ,officeName,city} = req.body;
|
|
|
|
|
|
|
|
|
|
if (!adminId) {
|
|
|
|
|
return reply.status(400).send({ simplydata: { error: true, message: "adminId is required in path params" } });
|
|
|
|
@ -75,7 +75,6 @@ exports.createTeamMember = async (req, reply) => {
|
|
|
|
|
alternativePhone,
|
|
|
|
|
installationTeamMemId: departmentId,
|
|
|
|
|
departmentId,
|
|
|
|
|
departmentName,
|
|
|
|
|
password: hashedPassword,
|
|
|
|
|
status: status || "active",
|
|
|
|
|
officeName,city
|
|
|
|
|