✨ 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:
+2
-4
@@ -32,7 +32,7 @@ const verify_account_using_link = catchAsync(async (req, res) => {
|
||||
const login_user = catchAsync(async (req, res) => {
|
||||
const result = await account_services.login_user_into_db(req);
|
||||
// set access token into cookie
|
||||
res.cookie("access_token", result, {
|
||||
res.cookie("access_token", result.accessToken, {
|
||||
secure: configs.env === "production",
|
||||
httpOnly: true,
|
||||
});
|
||||
@@ -40,9 +40,7 @@ const login_user = catchAsync(async (req, res) => {
|
||||
statusCode: 200,
|
||||
success: true,
|
||||
message: "User logged in successfully",
|
||||
data: {
|
||||
accessToken: result,
|
||||
},
|
||||
data: result,
|
||||
});
|
||||
});
|
||||
const get_user_account = catchAsync(async (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user