cretae team members

master^2
Bhaskar 2 months ago
parent be6d20dae8
commit 12de558085

@ -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

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

Loading…
Cancel
Save