Open lcaohoanq opened 4 months ago
@minhhy2801 I have created the file contain all routes and each role can access (demo for Admin), current have 3 role
Could i implement all route with Admin role and adjust later (each role only access there route)
Output create an Error Handling Middleware based on token -> take role -> all routers access successfully are correct If not return common Error code with 401, 404 and message Make sure just need to set this logic 1 place