File tree Expand file tree Collapse file tree 7 files changed +15
-13
lines changed Expand file tree Collapse file tree 7 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -103,14 +103,6 @@ class StatusType(IntEnum):
103103 enable = 1
104104
105105
106- class UserSocialType (StrEnum ):
107- """用户社交类型"""
108-
109- github = 'GitHub'
110- google = 'Google'
111- linux_do = 'LinuxDo'
112-
113-
114106class FileType (StrEnum ):
115107 """文件类型"""
116108
Original file line number Diff line number Diff line change 55from fastapi_oauth20 import FastAPIOAuth20 , GitHubOAuth20
66from starlette .responses import RedirectResponse
77
8- from backend .common .enums import UserSocialType
98from backend .common .response .response_schema import ResponseSchemaModel , response_base
109from backend .core .conf import settings
1110from backend .database .db import CurrentSessionTransaction
11+ from backend .plugin .oauth2 .enums import UserSocialType
1212from backend .plugin .oauth2 .service .oauth2_service import oauth2_service
1313
1414router = APIRouter ()
Original file line number Diff line number Diff line change 55from fastapi_oauth20 import FastAPIOAuth20 , GoogleOAuth20
66from starlette .responses import RedirectResponse
77
8- from backend .common .enums import UserSocialType
98from backend .common .response .response_schema import ResponseSchemaModel , response_base
109from backend .core .conf import settings
1110from backend .database .db import CurrentSessionTransaction
11+ from backend .plugin .oauth2 .enums import UserSocialType
1212from backend .plugin .oauth2 .service .oauth2_service import oauth2_service
1313
1414router = APIRouter ()
Original file line number Diff line number Diff line change 55from fastapi_oauth20 import FastAPIOAuth20 , LinuxDoOAuth20
66from starlette .responses import RedirectResponse
77
8- from backend .common .enums import UserSocialType
98from backend .common .response .response_schema import ResponseSchemaModel , response_base
109from backend .core .conf import settings
1110from backend .database .db import CurrentSessionTransaction
11+ from backend .plugin .oauth2 .enums import UserSocialType
1212from backend .plugin .oauth2 .service .oauth2_service import oauth2_service
1313
1414router = APIRouter ()
Original file line number Diff line number Diff line change 1+ from backend .common .enums import StrEnum
2+
3+
4+ class UserSocialType (StrEnum ):
5+ """用户社交类型"""
6+
7+ github = 'GitHub'
8+ google = 'Google'
9+ linux_do = 'LinuxDo'
Original file line number Diff line number Diff line change 11from pydantic import Field
22
3- from backend .common .enums import UserSocialType
43from backend .common .schema import SchemaBase
4+ from backend .plugin .oauth2 .enums import UserSocialType
55
66
77class UserSocialSchemaBase (SchemaBase ):
Original file line number Diff line number Diff line change 99from backend .app .admin .schema .user import AddOAuth2UserParam
1010from backend .app .admin .service .login_log_service import login_log_service
1111from backend .common .context import ctx
12- from backend .common .enums import LoginLogStatusType , UserSocialType
12+ from backend .common .enums import LoginLogStatusType
1313from backend .common .i18n import t
1414from backend .common .security import jwt
1515from backend .core .conf import settings
1616from backend .database .redis import redis_client
1717from backend .plugin .oauth2 .crud .crud_user_social import user_social_dao
18+ from backend .plugin .oauth2 .enums import UserSocialType
1819from backend .plugin .oauth2 .schema .user_social import CreateUserSocialParam
1920from backend .utils .timezone import timezone
2021
You can’t perform that action at this time.
0 commit comments