Skip to content

Commit 2a51c76

Browse files
authored
Update the sub router settings in the subdirectory (#32)
1 parent 0bd01f4 commit 2a51c76

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

backend/app/api/routers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
v1 = APIRouter(prefix='/v1')
99

10-
v1.include_router(auth_router, prefix='/users', tags=['用户管理'])
10+
v1.include_router(auth_router)
1111

1212
v1.include_router(task_demo_router, prefix='/tasks', tags=['任务管理'])
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/usr/bin/env python3
22
# -*- coding: utf-8 -*-
3-
from backend.app.api.v1.auth.user import router
3+
from fastapi import APIRouter
4+
from backend.app.api.v1.auth.user import router as user_router
5+
6+
router = APIRouter(prefix='/auth', tags=['用户管理'])
7+
8+
router.include_router(user_router, prefix='/users')

0 commit comments

Comments
 (0)