mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
refactor: optimize notification and subscription query using index (#5414)
### What type of PR is this? /kind improvement /area core /milestone 2.13.x ### What this PR does / why we need it: 使用索引机制优化通知和订阅查询以提高性能 how to test it 测试通知列表不报错即可 ### Does this PR introduce a user-facing change? ```release-note 使用索引机制优化通知和订阅查询以提高性能 ```
This commit is contained in:
@@ -31,7 +31,7 @@ const {
|
||||
queryFn: async () => {
|
||||
const { data } = await apiClient.notification.listUserNotifications({
|
||||
username: currentUser?.metadata.name as string,
|
||||
unRead: activeTab.value === "unread",
|
||||
fieldSelector: [`spec.unread=${activeTab.value === "unread"}`],
|
||||
});
|
||||
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user