✨ feat(account, order, plan, profile, redis): enhance functionality and security
- Updated CORS settings for frontend compatibility. - Integrated Redis URL configuration. - Improved login response structure in account service. - Added role-based authorization for order and plan management. - Enhanced error handling and logging in profile and plan services. - Updated Swagger documentation for clarity on order statuses. - Configured Redis connection for better performance.
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ const get_single_plan_from_db = async (req) => {
|
||||
};
|
||||
const create_plan_into_db = async (req) => {
|
||||
// define your own login here
|
||||
const user = req.user;
|
||||
const user = req?.user;
|
||||
if (user?.role !== "ADMIN") {
|
||||
throw new AppError("You don’t have permission to create plan information.!!!", 401);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user