6 Commits

Author SHA1 Message Date
pmc
5269a08118 feat(03-01): 在 aiapp/views.py 末尾追加 CredentialSlotClientView 类
- 新增 _credential_slot_client_data_schema:客户端响应 schema,access_token description 标注「明文」
- 新增 CredentialSlotClientView(APIView):仅 GET,user/admin token 鉴权(RedisTokenAuthentication + IsAuthenticated)
- 关键差异(vs Phase 2 admin view):不调 _ensure_admin / 不调 _build_response_data / 不调 mask_token / 不含 def put
- 直接 success_response(data=serializer.data) 明文返回,供手机/设备端实际调用第三方服务
- imports 段未变(Phase 2 已就位 CredentialSlot/CredentialSlotSerializer/RedisTokenAuthentication 等)

CRED-05 落地步骤 1/3
2026-05-08 10:13:07 +08:00
pmc
192d0a15ec feat(02-01): 新增 CredentialSlotAdminView(GET 脱敏 / PUT 全字段覆写)
- 1:1 复刻 RTCChatHistoryAPIView 单 URL 多方法 APIView 风格(不走 RetrieveUpdateAPIView)
- authentication_classes=[RedisTokenAuthentication]
- permission_classes=[IsAuthenticated] + view 内 _ensure_admin 二次校验 is_staff
  (per RESEARCH.md:仓库零处 IsAdminTokenAuthenticated 类,沿用 AdminEmailLoginView 模式)
- _build_response_data helper 强制脱敏:data['access_token'] = mask_token(instance.access_token)
- GET / PUT 都走 _build_response_data,避免 PUT 直接 return success_response(data=serializer.data)
  导致明文回显(CONTEXT.md / Pitfall 3 锁定)
- @swagger_auto_schema method-level 装饰:access_token 字段 description 显式标注脱敏掩码
- 顶部 import 追加:CredentialSlot / CredentialSlotSerializer / mask_token /
  get_standardized_response_schema
2026-05-07 22:53:38 +08:00
pmc
c1722413ad feat: update AI app, device interaction, and docs
- Update aiapp views
- Update device_interaction consumers and views
- Update docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 11:55:42 +08:00
pmc
59b178f8f4 feat: update AI app views/urls and add RTC bot migration
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 11:55:52 +08:00
pmc
bd95ba470c feat: update admin panel, API modules, and add migrations
- Update food, outfits, props, home-decor pages and components
- Add permissions page and sidebar updates
- Update API client and all API modules (auth, food, dances, etc.)
- Add card model migrations for optional fields
- Update Django views, serializers, and authentication
- Add affinity level migrations and user app updates
- Add project documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:06:50 +08:00
zyc
0c610c1e49 first commit 2026-03-17 13:17:02 +08:00