From 467e0c2634eaf0bc6535d47af1eb6afca6adb3bd Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 4 Dec 2025 21:35:02 +0530 Subject: [PATCH] cookieAuth added for all api : GWM --- app/routes/routes.js | 132 +++++++++++++++++++++---------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/app/routes/routes.js b/app/routes/routes.js index 16c37f4..c0416fb 100644 --- a/app/routes/routes.js +++ b/app/routes/routes.js @@ -418,7 +418,7 @@ router.get("/testEmail", establishmentController.testEmail); * tags: [Establishments] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -510,7 +510,7 @@ router.post("/establishments",[verifySignature, verifyToken], establishmentContr * tags: [Establishments] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: page @@ -564,7 +564,7 @@ router.get("/establishments",[verifySignature, verifyToken], establishmentContro * tags: [Establishments] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -588,7 +588,7 @@ router.get("/establishments/:id",[verifySignature, verifyToken], establishmentCo * tags: [Establishments] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -672,7 +672,7 @@ router.put("/establishments/:id",[verifySignature, verifyToken], establishmentCo * tags: [Establishments] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -698,7 +698,7 @@ router.delete("/establishments/:id",[verifySignature, verifyToken], establishmen * tags: [Establishments] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -742,7 +742,7 @@ router.post("/establishments/uploadCSV",[verifySignature, verifyToken, upload.si * tags: [Establishment Users] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -791,7 +791,7 @@ router.post("/establishment-users",[verifySignature, verifyToken], establishment * tags: [Establishment Users] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: establishment_id @@ -814,7 +814,7 @@ router.get("/establishment-users",[verifySignature, verifyToken], establishmentU * tags: [Establishment Users] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -838,7 +838,7 @@ router.get("/establishment-users/:id",[verifySignature, verifyToken], establishm * tags: [Establishment Users] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -886,7 +886,7 @@ router.put("/establishment-users/:id",[verifySignature, verifyToken], establishm * description: Allows an establishment user to change their password after verifying the old password. * tags: [Establishment Users] * security: - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -935,7 +935,7 @@ router.put("/establishment-users/:id/change-password",[verifySignature, verifyTo * tags: [Establishment Users] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1024,7 +1024,7 @@ router.delete("/establishment-users/:id",[verifySignature, verifyToken], establi * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1062,7 +1062,7 @@ router.post("/products",[verifySignature, verifyToken], productController.create * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: List of products @@ -1077,7 +1077,7 @@ router.get("/products",[verifySignature, verifyToken], productController.getAllP * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1100,7 +1100,7 @@ router.get("/products/:id", [verifySignature, verifyToken],productController.get * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1144,7 +1144,7 @@ router.put("/products/:id",[verifySignature, verifyToken], productController.upd * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1168,7 +1168,7 @@ router.delete("/products/:id",[verifySignature, verifyToken], productController. * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1199,7 +1199,7 @@ router.post("/products/uploadCSV",[ verifySignature, verifyToken, upload.single( * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: Sample CSV file downloaded successfully @@ -1239,7 +1239,7 @@ router.get("/download-sample-product-upload-file",[verifySignature, verifyToken] * tags: [Establishment Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1280,7 +1280,7 @@ router.post("/establishment-products",[verifySignature, verifyToken], establishm * tags: [Establishment Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: establishment_id @@ -1306,7 +1306,7 @@ router.get("/establishment-products",[verifySignature, verifyToken], establishme * tags: [Establishment Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1332,7 +1332,7 @@ router.get("/establishment-products/:id",[verifySignature, verifyToken], establi * tags: [Establishment Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1379,7 +1379,7 @@ router.put("/establishment-products/:id",[verifySignature, verifyToken], establi * tags: [Establishment Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1421,7 +1421,7 @@ router.delete("/establishment-products/:id",[verifySignature, verifyToken], esta * tags: [Variation Reason Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1450,7 +1450,7 @@ router.post("/variation_reasons",[verifySignature, verifyToken], variationReason * tags: [Variation Reason Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: List of reasons @@ -1465,7 +1465,7 @@ router.get("/variation_reasons",[verifySignature, verifyToken], variationReasonM * tags: [Variation Reason Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1489,7 +1489,7 @@ router.get("/variation_reasons/:id",[verifySignature, verifyToken], variationRea * tags: [Variation Reason Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1529,7 +1529,7 @@ router.put("/variation_reasons/:id",[verifySignature, verifyToken], variationRea * tags: [Variation Reason Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1568,7 +1568,7 @@ router.delete("/variation_reasons/:id",[verifySignature, verifyToken], variation * tags: [Zero Target Reasons] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: List of reasons @@ -1583,7 +1583,7 @@ router.get("/zero_target_reason/",[verifySignature, verifyToken], zeroTargetReas * tags: [Zero Target Reasons] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -1604,7 +1604,7 @@ router.get("/zero_target_reason/:id",[verifySignature, verifyToken], zeroTargetR * tags: [Zero Target Reasons] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1630,7 +1630,7 @@ router.post("/zero_target_reason/",[verifySignature, verifyToken], zeroTargetRea * tags: [Zero Target Reasons] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -1660,7 +1660,7 @@ router.put("/zero_target_reason/:id",[verifySignature, verifyToken], zeroTargetR * tags: [Zero Target Reasons] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -1690,7 +1690,7 @@ router.delete("/zero_target_reason/:id",[verifySignature, verifyToken], zeroTarg * tags: [Unit Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: List of units @@ -1705,7 +1705,7 @@ router.get("/unit_master",[verifySignature, verifyToken], unitMasterController.g * tags: [Unit Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1726,7 +1726,7 @@ router.get("/unit_master/:id",[verifySignature, verifyToken], unitMasterControll * tags: [Unit Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1753,7 +1753,7 @@ router.post("/unit_master",[verifySignature, verifyToken], unitMasterController. * tags: [Unit Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1788,7 +1788,7 @@ router.put("/unit_master/:id",[verifySignature, verifyToken], unitMasterControll * tags: [Unit Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: path * name: id @@ -1810,7 +1810,7 @@ router.delete("/unit_master/:id",[verifySignature, verifyToken], unitMasterContr * tags: [Unit Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1851,7 +1851,7 @@ router.post("/unit_master/uploadCSV",[ verifySignature, verifyToken, upload.sing * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -1920,7 +1920,7 @@ router.post("/submissions",[verifySignature, verifyToken], submissionController. * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -1994,7 +1994,7 @@ router.put("/submissions/:id",[verifySignature, verifyToken], submissionControll * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: establishment_id * in: path @@ -2013,7 +2013,7 @@ router.get("/submissions/history/:establishment_id",[verifySignature, verifyToke * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: page @@ -2059,7 +2059,7 @@ router.get("/submissions",[verifySignature, verifyToken], submissionController.s * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2102,7 +2102,7 @@ router.get("/submissions/view/:id",[verifySignature, verifyToken], submissionCon * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2130,7 +2130,7 @@ router.put("/submissionEditRequest/:id",[verifySignature, verifyToken], submissi * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2160,7 +2160,7 @@ router.put("/enableOrDisableSubmissionEditAccess/:id",[verifySignature, verifyTo * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2196,7 +2196,7 @@ router.put("/approveOrRejectSubmission/:id",[verifySignature, verifyToken], subm * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -2220,7 +2220,7 @@ router.post("/getQuarterPeriods",[verifySignature, verifyToken], submissionContr * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: establishment_id @@ -2256,7 +2256,7 @@ router.get("/submissions/getPreviousForecastData",[verifySignature, verifyToken] * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: establishment_id @@ -2285,7 +2285,7 @@ router.get("/submissions/getProductSubmissionHistory",[verifySignature, verifyTo * tags: [Submissions] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: establishment_id @@ -2342,7 +2342,7 @@ router.get("/submission-audit-history",[verifySignature, verifyToken], submissi * tags: [Config] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -2479,7 +2479,7 @@ router.get("/admin_dashboard",[verifySignature, verifyToken], dashboardControlle * tags: [Notification Templates] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: Fetched successfully @@ -2494,7 +2494,7 @@ router.get("/notification_templates",[verifySignature, verifyToken], notificatio * tags: [Notification Templates] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2515,7 +2515,7 @@ router.get("/notification_templates/:id",[verifySignature, verifyToken], notific * tags: [Notification Templates] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2558,7 +2558,7 @@ router.put("/notification_templates/:id",[verifySignature, verifyToken], notific * tags: [Quarterly Windows Configuration] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -2587,7 +2587,7 @@ router.post("/quarterly_windows",[verifySignature, verifyToken], quarterlyWindow * tags: [Quarterly Windows Configuration] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: Fetched successfully @@ -2602,7 +2602,7 @@ router.get("/quarterly_windows",[verifySignature, verifyToken], quarterlyWindows * tags: [Quarterly Windows Configuration] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2621,7 +2621,7 @@ router.get("/quarterly_windows/:id",[verifySignature, verifyToken], quarterlyWin * tags: [Quarterly Windows Configuration] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - name: id * in: path @@ -2663,7 +2663,7 @@ router.put("/quarterly_windows/:id",[verifySignature, verifyToken], quarterlyWin * tags: [Establishment Password Reset Requests] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: List of all password reset requests @@ -2681,7 +2681,7 @@ router.get("/password-reset-requests", establishmentController.getAllRequests); * tags: [Establishment Password Reset Requests] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * requestBody: * required: true * content: @@ -2811,7 +2811,7 @@ router.post("/forgot-password/verify-otp", establishmentController.forgotPasswor * tags: [Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: Emirates fetched successfully @@ -2828,7 +2828,7 @@ router.get("/emirates", [verifySignature, verifyToken], establishmentController. * tags: [Master] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * parameters: * - in: query * name: emirate_id @@ -2851,7 +2851,7 @@ router.get("/city-towns", [verifySignature, verifyToken], establishmentControlle * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: Sample CSV file downloaded successfully @@ -2875,7 +2875,7 @@ router.get("/establishment/download-sample-file",[verifySignature, verifyToken], * tags: [Products] * security: * - appSignature: [] - * - bearerAuth: [] + * cookieAuth: [] # or bearerAuth: [] if you use Authorization header * responses: * 200: * description: Sample CSV file downloaded successfully