fix(log): 修复新前端日志按登录类型(type=7)筛选失效 - #5620
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe ChangesUsage Logs Route Validation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
路由 search 校验枚举 logTypeValues 漏了 '7'(登录), 选「登录」时 type=['7'] 校验失败被 .catch([]) 兜底成空数组, 最终请求丢掉 type 参数。补上 '7' 与 LOG_TYPE_ENUM.LOGIN 对齐。
656f07e to
86e61b5
Compare
路由 search 校验枚举 logTypeValues 漏了 '7'(登录), 选「登录」时 type=['7'] 校验失败被 .catch([]) 兜底成空数组, 最终请求丢掉 type 参数。补上 '7' 与 LOG_TYPE_ENUM.LOGIN 对齐。
路由 search 校验枚举 logTypeValues 漏了 '7'(登录), 选「登录」时 type=['7'] 校验失败被 .catch([]) 兜底成空数组, 最终请求丢掉 type 参数。补上 '7' 与 LOG_TYPE_ENUM.LOGIN 对齐。
路由 search 校验枚举 logTypeValues 漏了 '7'(登录), 选「登录」时 type=['7'] 校验失败被 .catch([]) 兜底成空数组, 最终请求丢掉 type 参数。补上 '7' 与 LOG_TYPE_ENUM.LOGIN 对齐。
路由 search 校验枚举 logTypeValues 漏了 '7'(登录), 选「登录」时 type=['7'] 校验失败被 .catch([]) 兜底成空数组, 最终请求丢掉 type 参数。补上 '7' 与 LOG_TYPE_ENUM.LOGIN 对齐。
📝 变更描述 / Description
修复新前端「通用日志」按登录类型(type=7)筛选无效的问题。
根因:路由 search 校验的枚举
logTypeValues只列了'0'~'6',漏掉了登录类型'7'。下拉框选「登录」后type=['7']校验失败,被.catch([])兜底成空数组,导致最终请求丢掉type参数,后端按全部类型返回。修复:将
'7'补入logTypeValues,与LOG_TYPE_ENUM.LOGIN、LOG_TYPES保持一致。🚀 变更类型 / Type of change
✅ 提交前检查项 / Checklist
type=7)📸 运行证明 / Proof of Work
修复前:选「登录」筛选,请求 URL 无
type参数,返回所有类型日志。修复后:请求携带
type=7,仅返回登录日志。Summary by CodeRabbit