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.
|
|
|
const installationController = require("../controllers/installationController")
|
|
|
|
|
|
|
|
module.exports = function (fastify, opts, next) {
|
|
|
|
|
|
|
|
fastify.post("/api/createTeamMember", {
|
|
|
|
schema: {
|
|
|
|
description: "Create a new team member under an installation",
|
|
|
|
tags: ["Installation"],
|
|
|
|
summary: "Create Team Member",
|
|
|
|
body: {
|
|
|
|
type: "object",
|
|
|
|
required: ["installationId", "name", "phone", "password"],
|
|
|
|
properties: {
|
|
|
|
installationId: { type: "string", description: "Installation ID to associate the team member with" },
|
|
|
|
name: { type: "string", description: "Full name of the team member" },
|
|
|
|
phone: { type: "string", description: "Phone number of the team member" },
|
|
|
|
password: { type: "string", description: "Password for the team member" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
handler: installationController.createTeamMember,
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
next();
|
|
|
|
|
|
|
|
}
|