|
|
|
@ -14,8 +14,8 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
type: "object",
|
|
|
|
type: "object",
|
|
|
|
//required: ["phone", "username", "password", "role"], // Add role to required fields
|
|
|
|
//required: ["phone", "username", "password", "role"], // Add role to required fields
|
|
|
|
properties: {
|
|
|
|
properties: {
|
|
|
|
phone: { type: "string" },
|
|
|
|
// phone: { type: "string" },
|
|
|
|
password: { type: "string" },
|
|
|
|
// password: { type: "string" },
|
|
|
|
city: { type: "string" },
|
|
|
|
city: { type: "string" },
|
|
|
|
state: { type: "string" },
|
|
|
|
state: { type: "string" },
|
|
|
|
country: { type: "string" },
|
|
|
|
country: { type: "string" },
|
|
|
|
@ -76,6 +76,23 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
handler: departmentController.getalldepartmants,
|
|
|
|
handler: departmentController.getalldepartmants,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fastify.get("/api/getalldepartmentsParticularFileds", {
|
|
|
|
|
|
|
|
schema: {
|
|
|
|
|
|
|
|
tags: ["Department"],
|
|
|
|
|
|
|
|
description: "This is for Get all Department particular fileds Data",
|
|
|
|
|
|
|
|
summary: "This is for to Get all Department particular fields Data",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
security: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
basicAuth: [],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//preHandler: fastify.auth([fastify.authenticate]),
|
|
|
|
|
|
|
|
handler: departmentController.getAllDepartmentsParticularFields,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
fastify.delete("/api/deletedepartment/:departmentId", {
|
|
|
|
fastify.delete("/api/deletedepartment/:departmentId", {
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
description: "Delete a Department by departmentId",
|
|
|
|
description: "Delete a Department by departmentId",
|
|
|
|
@ -116,7 +133,7 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
body: {
|
|
|
|
body: {
|
|
|
|
type: "object",
|
|
|
|
type: "object",
|
|
|
|
properties: {
|
|
|
|
properties: {
|
|
|
|
phone: { type: "string" },
|
|
|
|
// phone: { type: "string" },
|
|
|
|
city: { type: "string" },
|
|
|
|
city: { type: "string" },
|
|
|
|
state: { type: "string" },
|
|
|
|
state: { type: "string" },
|
|
|
|
country: { type: "string" },
|
|
|
|
country: { type: "string" },
|
|
|
|
@ -154,7 +171,11 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
zone: { type: "string" },
|
|
|
|
zone: { type: "string" },
|
|
|
|
pincode: { type: "string" },
|
|
|
|
pincode: { type: "string" },
|
|
|
|
desginationName: { type: "string" },
|
|
|
|
desginationName: { type: "string" },
|
|
|
|
|
|
|
|
departmentName: { type: "string" },
|
|
|
|
|
|
|
|
firstName: { type: "string" },
|
|
|
|
|
|
|
|
lastName: { type: "string" },
|
|
|
|
|
|
|
|
reportingManager: { type: "string" },
|
|
|
|
|
|
|
|
email: { type: "string" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
security: [
|
|
|
|
security: [
|
|
|
|
@ -255,6 +276,11 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
zone: { type: "string" },
|
|
|
|
zone: { type: "string" },
|
|
|
|
pincode: { type: "string" },
|
|
|
|
pincode: { type: "string" },
|
|
|
|
desginationName: { type: "string" },
|
|
|
|
desginationName: { type: "string" },
|
|
|
|
|
|
|
|
email: { type: "string" },
|
|
|
|
|
|
|
|
reportingManager: { type: "string" },
|
|
|
|
|
|
|
|
departmentName: { type: "string" },
|
|
|
|
|
|
|
|
firstName: { type: "string" },
|
|
|
|
|
|
|
|
lastName: { type: "string" },
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|