lty/qy_lty/userapp/admin_urls.py
pmc 9d020218d2 feat(02-01): 注册 /api/v1/admin/credential-slot/ 路由
- path('credential-slot/', CredentialSlotAdminView.as_view(), name='admin_credential_slot')
- 与 admin_login / admin_logout 在同一 admin namespace 注册块
- 路由汇总点单一:仅 userapp/admin_urls.py 注册,aiapp/urls.py 不重复
- reverse('admin_credential_slot') = /api/v1/admin/credential-slot/
- python manage.py check 通过(唯一 W004 STATICFILES_DIRS 与本 plan 无关)
2026-05-07 22:54:25 +08:00

16 lines
677 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.urls import path
from .views import AdminEmailLoginView, AdminLogoutView
# Phase 2 — 通用凭据槽位管理端读写接口CRED-03 + CRED-04
from aiapp.views import CredentialSlotAdminView
# 管理员专用API路径
urlpatterns = [
# 管理员登录
path('login/', AdminEmailLoginView.as_view(), name='admin_login'),
# 管理员登出
path('logout/', AdminLogoutView.as_view(), name='admin_logout'),
# 通用凭据槽位GET 脱敏读取 / PUT 全字段覆写admin token 鉴权)
path('credential-slot/', CredentialSlotAdminView.as_view(), name='admin_credential_slot'),
# 后续可以添加更多管理员专用接口
]