const departmentController = require('../controllers/departmentController') module.exports = function (fastify, opts, next) { fastify.route({ method: "POST", url: "/api/departmentSignup", schema: { tags: ["Department"], description: "This is for creating a new Department Account", summary: "This is for creating a new Department Account", body: { type: "object", //required: ["phone", "username", "password", "role"], // Add role to required fields properties: { phone: { type: "string" }, password: { type: "string" }, city: { type: "string" }, state: { type: "string" }, country: { type: "string" }, address1: { type: "string" }, address2: { type: "string" }, zone: { type: "string" }, pincode: { type: "string" }, departmentName: { type: "string" }, }, }, security: [ { basicAuth: [], }, ], }, handler: departmentController.addDepartment, }); next(); };