ashok 2 months ago
commit c194664e34

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

@ -19,7 +19,7 @@ module.exports = function (fastify, opts, next) {
required: ["departmentId", "departmentName", "firstName", "phone", "password"], required: ["departmentId", "departmentName", "firstName", "phone", "password"],
properties: { properties: {
departmentId: { type: "string", description: "Department ID (installationId)" }, departmentId: { type: "string", description: "Department ID (installationId)" },
departmentName: { type: "string", description: "Department name" }, //departmentName: { type: "string", description: "Department name" },
firstName: { type: "string" }, firstName: { type: "string" },
phone: { type: "string" }, phone: { type: "string" },
password: { type: "string" }, password: { type: "string" },

Loading…
Cancel
Save