From 7fc884acdcc9ad242dc2353b10cdbc6b12457464 Mon Sep 17 00:00:00 2001 From: ytqh Date: Sat, 29 Mar 2025 21:16:48 +0800 Subject: [PATCH] Refactor API tags for authentication and user profile endpoints to use 'service' prefix instead of 'user'. This change improves clarity and consistency in the API structure. --- api/controllers/admin/__init__.py | 2 +- api/controllers/service_api_with_auth/auth/login.py | 8 ++++---- api/controllers/service_api_with_auth/user/profile.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/controllers/admin/__init__.py b/api/controllers/admin/__init__.py index 8a98d752ea..5280758c3d 100644 --- a/api/controllers/admin/__init__.py +++ b/api/controllers/admin/__init__.py @@ -4,7 +4,7 @@ from libs.external_api import ExternalApi bp = Blueprint("admin_api", __name__, url_prefix="/admin/api") api = ExternalApi(bp) +# from .settings import settings from .auth import login -from .settings import settings from .stats import stats from .students import conversation, message, students diff --git a/api/controllers/service_api_with_auth/auth/login.py b/api/controllers/service_api_with_auth/auth/login.py index 413eead3d4..fa185fd71f 100644 --- a/api/controllers/service_api_with_auth/auth/login.py +++ b/api/controllers/service_api_with_auth/auth/login.py @@ -27,7 +27,7 @@ class LogoutApi(Resource): """Logout user. --- tags: - - user/auth + - service/auth summary: Logout User description: Logs out the authenticated user and invalidates the session responses: @@ -55,7 +55,7 @@ class EmailCodeLoginSendEmailApi(Resource): """Send email code for login. --- tags: - - user/auth + - service/auth summary: Email Code Login Email Sending description: Sends an email with a verification code for login parameters: @@ -123,7 +123,7 @@ class EmailCodeLoginApi(Resource): """Login using email code. --- tags: - - user/auth + - service/auth summary: Email Code Login description: Allows the user to login using a verification code and token sent via email parameters: @@ -237,7 +237,7 @@ class RefreshTokenApi(Resource): """Refresh authentication token. --- tags: - - user/auth + - service/auth summary: Refresh Token description: Refreshes an access token using a valid refresh token parameters: diff --git a/api/controllers/service_api_with_auth/user/profile.py b/api/controllers/service_api_with_auth/user/profile.py index 3105f5fcdd..4d1cc47ca1 100644 --- a/api/controllers/service_api_with_auth/user/profile.py +++ b/api/controllers/service_api_with_auth/user/profile.py @@ -14,7 +14,7 @@ class UserProfile(Resource): """Get user profile. --- tags: - - user/profile + - service/profile summary: Get profile description: Get current user's profile information security: @@ -47,7 +47,7 @@ class UserProfile(Resource): """Update user profile. --- tags: - - user/profile + - service/profile summary: Update profile description: Update user profile information security: