All notable changes to this project will be documented in this file.
Here we would have the update steps for 1.1.0 for people to follow.
- RBAC - Logic to authorize user to use routes based on role permission.
- Roles configuration can be customized in:
./src/config/roles.config.js
- RBAC middleware definition is in:
./src/middlewares/verifyRights.middleware.js
- You can use the middleware
verifyRights
in routes like this:
//Only users with getUsers permission can see this route router.get( '/users', authenticate, verifyRights('getUsers'), catchAsync(findAllUsers), );
- Roles configuration can be customized in:
- Refactor routes to keep API versioning tidy and clear. Now routes are defined in
./src/routes/v1/index.route.js
- Added a role field in user model definition
./src/models/user.model.js
to use the verifyRights middleware - Renamed
./src/config/database.config.js
to./src/config/mongodb.config.js
- Moved the entrypoint routes to
./src/routes/v1/app.route.js
- Refactor events (publisher/subscriber) to keep pub/sub logic tidy and clean. Now all events related controller & routes can be find here:
./src/controllers/events
./src/routes/events