|
|
@ -175,21 +175,38 @@ module.exports = function (fastify, opts, next) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handler: departmentController.editcity,
|
|
|
|
handler: departmentController.editcity,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// fastify.route({
|
|
|
|
|
|
|
|
// method: "GET",
|
|
|
|
|
|
|
|
// url: "/api/city/:cityId",
|
|
|
|
|
|
|
|
// schema: {
|
|
|
|
|
|
|
|
// tags: ["Department"],
|
|
|
|
|
|
|
|
// description: "This is for fetching a City details",
|
|
|
|
|
|
|
|
// summary: "This is for fetching a City details",
|
|
|
|
|
|
|
|
// params: {
|
|
|
|
|
|
|
|
// type: "object",
|
|
|
|
|
|
|
|
// properties: {
|
|
|
|
|
|
|
|
// cityId: { type: "string" }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// handler: departmentController.getCityDetails
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
fastify.route({
|
|
|
|
fastify.route({
|
|
|
|
method: "GET",
|
|
|
|
method: "GET",
|
|
|
|
url: "/api/city/:cityId",
|
|
|
|
url: "/api/details/:id",
|
|
|
|
schema: {
|
|
|
|
schema: {
|
|
|
|
tags: ["Department"],
|
|
|
|
tags: ["Department"],
|
|
|
|
description: "This is for fetching a City details",
|
|
|
|
description: "This is for fetching details of a branch or city",
|
|
|
|
summary: "This is for fetching a City details",
|
|
|
|
summary: "This is for fetching details of a branch or city",
|
|
|
|
params: {
|
|
|
|
params: {
|
|
|
|
type: "object",
|
|
|
|
type: "object",
|
|
|
|
properties: {
|
|
|
|
properties: {
|
|
|
|
cityId: { type: "string" }
|
|
|
|
id: { type: "string" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handler: departmentController.getCityDetails
|
|
|
|
handler: departmentController.getDetails
|
|
|
|
});
|
|
|
|
});
|
|
|
|
fastify.route({
|
|
|
|
fastify.route({
|
|
|
|
method: "GET",
|
|
|
|
method: "GET",
|
|
|
|