Skip to content

Commit bcc7641

Browse files
authored
Update the OAuth2 module to plugin (#620)
* Update the OAuth2 module to plugin * update create user social param
1 parent 9b0d9f8 commit bcc7641

29 files changed

+83
-81
lines changed

backend/app/admin/api/router.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
from backend.app.admin.api.v1.auth import router as auth_router
66
from backend.app.admin.api.v1.log import router as log_router
77
from backend.app.admin.api.v1.monitor import router as monitor_router
8-
from backend.app.admin.api.v1.oauth2 import router as oauth2_router
98
from backend.app.admin.api.v1.sys import router as sys_router
109
from backend.core.conf import settings
1110

1211
v1 = APIRouter(prefix=settings.FASTAPI_API_V1_PATH)
1312

1413
v1.include_router(auth_router)
15-
v1.include_router(oauth2_router)
1614
v1.include_router(sys_router)
1715
v1.include_router(log_router)
1816
v1.include_router(monitor_router)

backend/app/admin/api/v1/oauth2/__init__.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

backend/app/admin/crud/crud_user.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ async def get_list(self, dept: int | None, username: str | None, phone: str | No
189189
select(self.model)
190190
.options(
191191
selectinload(self.model.dept).options(noload(Dept.parent), noload(Dept.children), noload(Dept.users)),
192-
noload(self.model.socials),
193-
selectinload(self.model.roles).options(noload(Role.users), noload(Role.menus), noload(Role.rules)),
192+
selectinload(self.model.roles).options(noload(Role.users), noload(Role.menus), noload(Role.scopes)),
194193
)
195194
.order_by(desc(self.model.join_time))
196195
)

backend/app/admin/model/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
from backend.app.admin.model.opera_log import OperaLog
99
from backend.app.admin.model.role import Role
1010
from backend.app.admin.model.user import User
11-
from backend.app.admin.model.user_social import UserSocial

backend/app/admin/model/user.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from backend.utils.timezone import timezone
1616

1717
if TYPE_CHECKING:
18-
from backend.app.admin.model import Dept, Role, UserSocial
18+
from backend.app.admin.model import Dept, Role
1919

2020

2121
class User(Base):
@@ -55,8 +55,5 @@ class User(Base):
5555
)
5656
dept: Mapped[Dept | None] = relationship(init=False, back_populates='users')
5757

58-
# 用户社交信息一对多
59-
socials: Mapped[list[UserSocial]] = relationship(init=False, back_populates='user')
60-
6158
# 用户角色多对多
6259
roles: Mapped[list[Role]] = relationship(init=False, secondary=sys_user_role, back_populates='users')

backend/plugin/oauth2/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-

backend/plugin/oauth2/api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-

backend/plugin/oauth2/api/router.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
from fastapi import APIRouter
4+
5+
from backend.core.conf import settings
6+
from backend.plugin.oauth2.api.v1.github import router as github_router
7+
from backend.plugin.oauth2.api.v1.linux_do import router as linux_do_router
8+
9+
v1 = APIRouter(prefix=f'{settings.FASTAPI_API_V1_PATH}/oauth2')
10+
11+
v1.include_router(github_router, prefix='/github', tags=['Github OAuth2'])
12+
v1.include_router(linux_do_router, prefix='/linux-do', tags=['LinuxDo OAuth2'])
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-

backend/app/admin/api/v1/oauth2/github.py renamed to backend/plugin/oauth2/api/v1/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from fastapi_oauth20 import FastAPIOAuth20, GitHubOAuth20
66
from starlette.responses import RedirectResponse
77

8-
from backend.app.admin.service.oauth2_service import oauth2_service
98
from backend.common.enums import UserSocialType
109
from backend.common.response.response_schema import ResponseSchemaModel, response_base
1110
from backend.core.conf import settings
11+
from backend.plugin.oauth2.service.oauth2_service import oauth2_service
1212

1313
router = APIRouter()
1414

backend/app/admin/api/v1/oauth2/linux_do.py renamed to backend/plugin/oauth2/api/v1/linux_do.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from fastapi_oauth20 import FastAPIOAuth20, LinuxDoOAuth20
66
from starlette.responses import RedirectResponse
77

8-
from backend.app.admin.service.oauth2_service import oauth2_service
98
from backend.common.enums import UserSocialType
109
from backend.common.response.response_schema import ResponseSchemaModel, response_base
1110
from backend.core.conf import settings
11+
from backend.plugin.oauth2.service.oauth2_service import oauth2_service
1212

1313
router = APIRouter()
1414

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-

backend/app/admin/crud/crud_user_social.py renamed to backend/plugin/oauth2/crud/crud_user_social.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
from sqlalchemy.ext.asyncio import AsyncSession
44
from sqlalchemy_crud_plus import CRUDPlus
55

6-
from backend.app.admin.model import UserSocial
7-
from backend.app.admin.schema.user_social import CreateUserSocialParam
8-
from backend.common.enums import UserSocialType
6+
from backend.plugin.oauth2.model import UserSocial
7+
from backend.plugin.oauth2.schema.user_social import CreateUserSocialParam
98

109

1110
class CRUDUserSocial(CRUDPlus[UserSocial]):
1211
"""用户社交账号数据库操作类"""
1312

14-
async def get(self, db: AsyncSession, pk: int, source: UserSocialType) -> UserSocial | None:
13+
async def get(self, db: AsyncSession, pk: int, source: str) -> UserSocial | None:
1514
"""
1615
获取用户社交账号绑定详情
1716
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
from backend.plugin.oauth2.model.user_social import UserSocial

backend/app/admin/model/user_social.py renamed to backend/plugin/oauth2/model/user_social.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class UserSocial(Base):
2020

2121
id: Mapped[id_key] = mapped_column(init=False)
2222
source: Mapped[str] = mapped_column(String(20), comment='第三方用户来源')
23-
open_id: Mapped[str | None] = mapped_column(String(20), default=None, comment='第三方用户的 open id')
24-
uid: Mapped[str | None] = mapped_column(String(20), default=None, comment='第三方用户的 ID')
25-
union_id: Mapped[str | None] = mapped_column(String(20), default=None, comment='第三方用户的 union id')
23+
open_id: Mapped[str | None] = mapped_column(String(20), default=None, comment='第三方用户 open id')
24+
sid: Mapped[str | None] = mapped_column(String(20), default=None, comment='第三方用户 ID')
25+
union_id: Mapped[str | None] = mapped_column(String(20), default=None, comment='第三方用户 union id')
2626
scope: Mapped[str | None] = mapped_column(String(120), default=None, comment='第三方用户授予的权限')
2727
code: Mapped[str | None] = mapped_column(String(50), default=None, comment='用户的授权 code')
2828

2929
# 用户社交信息一对多
3030
user_id: Mapped[int | None] = mapped_column(
3131
ForeignKey('sys_user.id', ondelete='SET NULL'), default=None, comment='用户关联ID'
3232
)
33-
user: Mapped[User | None] = relationship(init=False, back_populates='socials')
33+
user: Mapped[User | None] = relationship(init=False, backref='socials')

backend/plugin/oauth2/plugin.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[plugin]
2+
summary = 'OAuth 2.0'
3+
version = '0.0.1'
4+
description = '通过 OAuth 2.0 的方式登录系统'
5+
author = 'wu-clan'
6+
7+
[app]
8+
router = ['v1']
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fastapi-oauth20>=0.0.1
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-

backend/app/admin/schema/user_social.py renamed to backend/plugin/oauth2/schema/user_social.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class UserSocialSchemaBase(SchemaBase):
1111

1212
source: UserSocialType = Field(description='社交平台')
1313
open_id: str | None = Field(None, description='开放平台 ID')
14-
uid: str | None = Field(None, description='用户 ID')
14+
sid: str | None = Field(None, description='第三方用户 ID')
1515
union_id: str | None = Field(None, description='开放平台唯一 ID')
1616
scope: str | None = Field(None, description='授权范围')
1717
code: str | None = Field(None, description='授权码')
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env python3
2+
# -*- coding: utf-8 -*-

backend/app/admin/service/oauth2_service.py renamed to backend/plugin/oauth2/service/oauth2_service.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
from fastapi import BackgroundTasks, Request, Response
77

88
from backend.app.admin.crud.crud_user import user_dao
9-
from backend.app.admin.crud.crud_user_social import user_social_dao
109
from backend.app.admin.schema.token import GetLoginToken
1110
from backend.app.admin.schema.user import RegisterUserParam
12-
from backend.app.admin.schema.user_social import CreateUserSocialParam
1311
from backend.app.admin.service.login_log_service import login_log_service
1412
from backend.common.enums import LoginLogStatusType, UserSocialType
1513
from backend.common.exception.errors import AuthorizationError
1614
from backend.common.security import jwt
1715
from backend.core.conf import settings
1816
from backend.database.db import async_db_session
1917
from backend.database.redis import redis_client
18+
from backend.plugin.oauth2.crud.crud_user_social import user_social_dao
19+
from backend.plugin.oauth2.schema.user_social import CreateUserSocialParam
2020
from backend.utils.timezone import timezone
2121

2222

@@ -45,15 +45,18 @@ async def create_with_login(
4545
async with async_db_session.begin() as db:
4646
# 获取 OAuth2 平台用户信息
4747
social_id = user.get('id')
48+
social_nickname = user.get('name')
49+
4850
social_username = user.get('username')
4951
if social == UserSocialType.github:
5052
social_username = user.get('login')
51-
social_nickname = user.get('name')
53+
5254
social_email = user.get('email')
53-
if social == UserSocialType.linux_do: # 不提供明文邮箱的平台
55+
if social == UserSocialType.linux_do:
5456
social_email = f'{social_username}@linux.do'
5557
if not social_email:
5658
raise AuthorizationError(msg=f'授权失败,{social.value} 账户未绑定邮箱')
59+
5760
# 创建系统用户
5861
sys_user = await user_dao.check_email(db, social_email)
5962
if not sys_user:
@@ -73,7 +76,7 @@ async def create_with_login(
7376
sys_user_id = sys_user.id
7477
user_social = await user_social_dao.get(db, sys_user_id, social.value)
7578
if not user_social:
76-
new_user_social = CreateUserSocialParam(source=social.value, uid=str(social_id), user_id=sys_user_id)
79+
new_user_social = CreateUserSocialParam(source=social.value, sid=str(social_id), user_id=sys_user_id)
7780
await user_social_dao.create(db, new_user_social)
7881
# 创建 token
7982
access_token = await jwt.create_access_token(

backend/plugin/tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ def inject_extra_router(plugin: dict[str, Any]) -> None:
149149
continue
150150

151151
# 解析插件路由配置
152-
file_config = plugin.get('api', {}).get(f'{file[:-3]}', {})
153-
prefix = file_config.get('prefix', '')
154-
tags = file_config.get('tags', [])
152+
file_config = plugin['api'][file[:-3]]
153+
prefix = file_config['prefix']
154+
tags = file_config['tags']
155155

156156
# 获取插件路由模块
157157
file_path = os.path.join(root, file)
@@ -204,7 +204,7 @@ def inject_app_router(plugin: dict[str, Any], target_router: APIRouter) -> None:
204204
module_path = f'backend.plugin.{plugin_name}.api.router'
205205
try:
206206
module = import_module_cached(module_path)
207-
routers = plugin.get('app', {}).get('router')
207+
routers = plugin['app']['router']
208208
if not routers or not isinstance(routers, list):
209209
raise PluginConfigError(f'应用级插件 {plugin_name} 配置文件存在错误,请检查')
210210

backend/sql/mysql/create_tables.sql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ create table sys_user_social
418418
id int auto_increment comment '主键 ID'
419419
primary key,
420420
source varchar(20) not null comment '第三方用户来源',
421-
open_id varchar(20) null comment '第三方用户的 open id',
422-
uid varchar(20) null comment '第三方用户的 ID',
423-
union_id varchar(20) null comment '第三方用户的 union id',
421+
open_id varchar(20) null comment '第三方用户 open id',
422+
sid varchar(20) null comment '第三方用户 ID',
423+
union_id varchar(20) null comment '第三方用户 union id',
424424
scope varchar(120) null comment '第三方用户授予的权限',
425425
code varchar(50) null comment '用户的授权 code',
426426
user_id int null comment '用户关联ID',
@@ -437,3 +437,4 @@ create index ix_sys_user_social_id
437437

438438
create index user_id
439439
on sys_user_social (user_id);
440+

backend/sql/mysql/init_test_data.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ values (1, '测试', 'Test', 'test', 0, null, 0, null, null, 0, 0, 1, null, nul
66
(2, '仪表盘', 'Dashboard', 'dashboard', 0, 'material-symbols:dashboard', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:15:45', null),
77
(3, '工作台', 'Workspace', 'workspace', 0, null, 1, '/dashboard/workspace/index.vue', null, 1, 1, 1, null, null, 2, '2023-07-27 19:17:59', null),
88
(4, '数据分析', 'Analytics', 'analytics', 0, null, 1, '/dashboard/analytics/index.vue', null, 1, 1, 1, null, null, 2, '2023-07-27 19:17:59', null),
9-
(5, '系统管理', 'Admin', 'admin', 0, 'eos-icons:admin', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:23:00', null),
10-
(6, '部门管理', 'SysDept', 'sys-dept', 0, null, 1, '/admin/dept/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:23:42', null),
11-
(7, '用户管理', 'SysUser', 'sys-user', 0, null, 1, '/admin/user/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:13', null),
12-
(8, '角色管理', 'SysRole', 'sys-role', 0, null, 1, '/admin/role/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:45', null),
13-
(9, '菜单管理', 'SysMenu', 'sys-menu', 0, null, 1, '/admin/menu/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:45:29', null),
14-
(10, 'API 管理', 'SysApi', 'sys-api', 0, null, 1, '/admin/api/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
15-
(11, '数据规则管理', 'SysDataRule', 'sys-data-rule', 0, null, 1, '/admin/data-rule/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
9+
(5, '系统管理', 'System', 'system', 0, 'eos-icons:admin', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:23:00', null),
10+
(6, '部门管理', 'SysDept', 'sys-dept', 0, null, 1, '/system/dept/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:23:42', null),
11+
(7, '用户管理', 'SysUser', 'sys-user', 0, null, 1, '/system/user/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:13', null),
12+
(8, '角色管理', 'SysRole', 'sys-role', 0, null, 1, '/system/role/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:45', null),
13+
(9, '菜单管理', 'SysMenu', 'sys-menu', 0, null, 1, '/system/menu/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:45:29', null),
14+
(10, '插件管理', 'SysPlugin', 'sys-plugin', 0, null, 1, '/system/plugin/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
15+
(11, '数据权限', 'SysDataPermission', 'sys-data-permission', 0, null, 1, '/system/data-permission/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
1616
(12, '系统自动化', 'Automation', 'automation', 0, 'material-symbols:automation', 0, null, null, 1, 1, 1, null, null, null, '2024-07-27 02:06:20', null),
1717
(13, '代码生成', 'CodeGenerator', 'code-generator', 0, null, 1, '/automation/code-generator/index.vue', null, 1, 1, 1, null, null, 12, '2024-07-27 12:24:54', null),
1818
(14, '系统监控', 'Monitor', 'monitor', 0, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:27:08', null),

backend/sql/postgresql/create_tables.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ create table sys_user_social
727727
primary key,
728728
source varchar(20) not null,
729729
open_id varchar(20),
730-
uid varchar(20),
730+
sid varchar(20),
731731
union_id varchar(20),
732732
scope varchar(120),
733733
code varchar(50),
@@ -744,11 +744,11 @@ comment on column sys_user_social.id is '主键 ID';
744744

745745
comment on column sys_user_social.source is '第三方用户来源';
746746

747-
comment on column sys_user_social.open_id is '第三方用户的 open id';
747+
comment on column sys_user_social.open_id is '第三方用户 open id';
748748

749-
comment on column sys_user_social.uid is '第三方用户的 ID';
749+
comment on column sys_user_social.uid is '第三方用户 ID';
750750

751-
comment on column sys_user_social.union_id is '第三方用户的 union id';
751+
comment on column sys_user_social.union_id is '第三方用户 union id';
752752

753753
comment on column sys_user_social.scope is '第三方用户授予的权限';
754754

backend/sql/postgresql/init_test_data.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ values (1, '测试', 'Test', 'test', 0, null, 0, null, null, 0, 0, 1, null, nul
66
(2, '仪表盘', 'Dashboard', 'dashboard', 0, 'material-symbols:dashboard', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:15:45', null),
77
(3, '工作台', 'Workspace', 'workspace', 0, null, 1, '/dashboard/workspace/index.vue', null, 1, 1, 1, null, null, 2, '2023-07-27 19:17:59', null),
88
(4, '数据分析', 'Analytics', 'analytics', 0, null, 1, '/dashboard/analytics/index.vue', null, 1, 1, 1, null, null, 2, '2023-07-27 19:17:59', null),
9-
(5, '系统管理', 'Admin', 'admin', 0, 'eos-icons:admin', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:23:00', null),
10-
(6, '部门管理', 'SysDept', 'sys-dept', 0, null, 1, '/admin/dept/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:23:42', null),
11-
(7, '用户管理', 'SysUser', 'sys-user', 0, null, 1, '/admin/user/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:13', null),
12-
(8, '角色管理', 'SysRole', 'sys-role', 0, null, 1, '/admin/role/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:45', null),
13-
(9, '菜单管理', 'SysMenu', 'sys-menu', 0, null, 1, '/admin/menu/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:45:29', null),
14-
(10, 'API 管理', 'SysApi', 'sys-api', 0, null, 1, '/admin/api/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
15-
(11, '数据规则管理', 'SysDataRule', 'sys-data-rule', 0, null, 1, '/admin/data-rule/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
9+
(5, '系统管理', 'System', 'system', 0, 'eos-icons:admin', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:23:00', null),
10+
(6, '部门管理', 'SysDept', 'sys-dept', 0, null, 1, '/system/dept/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:23:42', null),
11+
(7, '用户管理', 'SysUser', 'sys-user', 0, null, 1, '/system/user/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:13', null),
12+
(8, '角色管理', 'SysRole', 'sys-role', 0, null, 1, '/system/role/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:25:45', null),
13+
(9, '菜单管理', 'SysMenu', 'sys-menu', 0, null, 1, '/system/menu/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:45:29', null),
14+
(10, '插件管理', 'SysPlugin', 'sys-plugin', 0, null, 1, '/system/plugin/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
15+
(11, '数据权限', 'SysDataPermission', 'sys-data-permission', 0, null, 1, '/system/data-permission/index.vue', null, 1, 1, 1, null, null, 5, '2023-07-27 19:24:12', null),
1616
(12, '系统自动化', 'Automation', 'automation', 0, 'material-symbols:automation', 0, null, null, 1, 1, 1, null, null, null, '2024-07-27 02:06:20', null),
1717
(13, '代码生成', 'CodeGenerator', 'code-generator', 0, null, 1, '/automation/code-generator/index.vue', null, 1, 1, 1, null, null, 12, '2024-07-27 12:24:54', null),
1818
(14, '系统监控', 'Monitor', 'monitor', 0, 'mdi:monitor-eye', 0, null, null, 1, 1, 1, null, null, null, '2023-07-27 19:27:08', null),

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ dependencies = [
2828
"fast-captcha>=0.3.2",
2929
"fastapi-cli==0.0.5",
3030
"fastapi-limiter>=0.1.6",
31-
"fastapi-oauth20>=0.0.1",
3231
"fastapi-pagination>=0.13.0",
3332
"fastapi[standard]==0.115.11",
3433
"flower>=2.0.0",

requirements.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ fastapi-cli==0.0.5
9797
# fastapi-best-architecture
9898
fastapi-limiter==0.1.6
9999
# via fastapi-best-architecture
100-
fastapi-oauth20==0.0.1
101-
# via fastapi-best-architecture
102100
fastapi-pagination==0.13.0
103101
# via fastapi-best-architecture
104102
filelock==3.18.0
@@ -123,9 +121,7 @@ httpcore==1.0.7
123121
httptools==0.6.4
124122
# via uvicorn
125123
httpx==0.28.1
126-
# via
127-
# fastapi
128-
# fastapi-oauth20
124+
# via fastapi
129125
humanize==4.12.2
130126
# via flower
131127
identify==2.6.9

0 commit comments

Comments
 (0)