mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2025-08-19 15:47:35 +08:00

* WIP: add rbac authorization * Perform pre-commit fixes * add rbac route whitelist * add init test data user role associations * Restore database table id naming to fix generic crud base * Add database section value uniqueness settings * Update the test directory to tests * Update route_name file name to health_check * Split user auth and user action interfaces * Fix conflict between merge and current branch * Add pymysql dependencies * Fix RBAC authentication method * Add the select serialisation tool * Fix missing return messages due to global exception handler slicing * Update the user interface with associated relationships * Add items to be completed * Perform pre-commit fixes * Add pre-made routers * Paging data return structure optimisation * Split user auth and user interface tests * Fix user register test data structure error * Fix duplicate named test classes
26 lines
1.2 KiB
Python
26 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
from fastapi import APIRouter
|
|
|
|
from backend.app.api.v1.auth import router as auth_router
|
|
from backend.app.api.v1.user import router as user_router
|
|
from backend.app.api.v1.casbin import router as casbin_router
|
|
from backend.app.api.v1.dept import router as dept_router
|
|
from backend.app.api.v1.role import router as role_router
|
|
from backend.app.api.v1.menu import router as menu_router
|
|
from backend.app.api.v1.api import router as api_router
|
|
from backend.app.api.v1.task_demo import router as task_demo_router
|
|
from backend.app.api.v1.config import router as config_router
|
|
|
|
v1 = APIRouter(prefix='/v1')
|
|
|
|
v1.include_router(auth_router)
|
|
v1.include_router(user_router, prefix='/users', tags=['用户管理'])
|
|
v1.include_router(casbin_router, prefix='/casbin', tags=['权限管理'])
|
|
v1.include_router(dept_router, prefix='/depts', tags=['部门管理'])
|
|
v1.include_router(role_router, prefix='/roles', tags=['角色管理'])
|
|
v1.include_router(menu_router, prefix='/menus', tags=['菜单管理'])
|
|
v1.include_router(api_router, prefix='/apis', tags=['API管理'])
|
|
v1.include_router(config_router, prefix='/configs', tags=['系统配置'])
|
|
v1.include_router(task_demo_router, prefix='/tasks', tags=['任务管理'])
|