seaislee1209 5bb49b5940
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m19s
feat: v0.10.3 用户在线状态 + logout 会话清理
- 用户管理/团队详情/内容资产页用户名前显示在线状态(绿点/灰点)
- 基于 ActiveSession 表判断在线状态(Exists 子查询)
- 新增 POST /auth/logout 接口,退出时清除 ActiveSession
- 前端退出登录时先用 fetch 发 logout 请求再清 token,确保会话被正确删除

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 01:30:30 +08:00

14 lines
494 B
Python

from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView
from . import views
urlpatterns = [
path('register', views.register_view, name='register'),
path('login', views.login_view, name='login'),
path('token/refresh', TokenRefreshView.as_view(), name='token_refresh'),
path('me', views.me_view, name='me'),
path('logout', views.logout_view, name='logout'),
path('change-password', views.change_password_view, name='change_password'),
]