diff --git a/src/controllers/exampleController.js b/src/controllers/exampleController.js index 69a8c39..a1aefe5 100644 --- a/src/controllers/exampleController.js +++ b/src/controllers/exampleController.js @@ -11,6 +11,13 @@ class ExampleController { next(err); } } + async publicApi(req, res, next) { + try { + return res.send("success"); + } catch (err) { + next(err); + } + } } diff --git a/src/routes/exampleRouter.js b/src/routes/exampleRouter.js index 3243254..f9271e3 100644 --- a/src/routes/exampleRouter.js +++ b/src/routes/exampleRouter.js @@ -9,4 +9,7 @@ const router = express.Router(); router.route("/:id") .get(grantAccessByPermissionMiddleware([API_PERMISSIONS.PUBLIC_ENDPOINT]), exampleController.getById) +router.route("/public") + .get(exampleController.publicApi) + export default router; \ No newline at end of file