diff --git a/src/routes/departmentRoute.js b/src/routes/departmentRoute.js index 0e9e02a8..15076d06 100644 --- a/src/routes/departmentRoute.js +++ b/src/routes/departmentRoute.js @@ -696,7 +696,7 @@ module.exports = function (fastify, opts, next) { fastify.route({ method: "GET", - url: "/api/states/:stateName/cities", + url: "/api/states/cities/:stateName", schema: { tags: ["Department"], description: "Get the States by cities", @@ -705,6 +705,7 @@ module.exports = function (fastify, opts, next) { type: "object", properties: { stateName: { type: "string" }, + }, }, },