You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

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();
};