feat: implement customer profile management and business application features
- Added customer profile controller with endpoints for retrieving, updating, and deactivating user profiles. - Introduced address model and routes for managing user addresses. - Created business application model and service for handling business applications, including approval and rejection processes. - Developed business contact and credit account models to support business customer functionalities. - Implemented settlement term model for managing payment terms. - Added email templates for business application notifications (approved, rejected, received, and status changes). - Enhanced validation schemas for customer and business inputs to ensure data integrity. - Created unit tests for business application service and validation schemas to ensure functionality and correctness. - Added migration scripts to set up new database tables and columns for customer and business features.
This commit is contained in:
@@ -24,6 +24,11 @@ const { sensitiveLimiter } = require("../middleware/rateLimit.middleware");
|
||||
const validate = require("../middleware/validate.middleware");
|
||||
const schemas = require("../validation/auth.schemas");
|
||||
const { requireOwnership } = require("../middleware/permission.middleware");
|
||||
const customerProfile = require("../controllers/customerProfile.controller");
|
||||
const customerSchemas = require("../validation/customer.schemas");
|
||||
|
||||
router.get("/me", authenticate, customerProfile.getMe);
|
||||
router.patch("/me", authenticate, validate(customerSchemas.profileUpdate), customerProfile.updateMe);
|
||||
|
||||
router.post("/req-reset-password", sensitiveLimiter, validate(schemas.forgot), authController.forgotPassword);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user