feat(web): change interest distribution api

This commit is contained in:
zhaoying
2026-03-04 10:59:29 +08:00
parent 87df352adc
commit 68c4c7429c
2 changed files with 6 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-03 14:00:06
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-03 14:00:06
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-04 10:58:41
*/
import { request } from '@/utils/request'
import type {
@@ -98,8 +98,8 @@ export const getMemorySearchEdges = (end_user_id: string) => {
return request.get(`/memory-storage/analytics/graph_data`, { end_user_id })
}
// User Memory - User interest distribution
export const getHotMemoryTagsByUser = (end_user_id: string) => {
return request.get(`/memory/analytics/hot_memory_tags/by_user`, { end_user_id })
export const getInterestDistributionByUser = (end_user_id: string) => {
return request.get(`/memory/analytics/interest_distribution/by_user`, { end_user_id })
}
// User Memory - Total memory count
export const getTotalMemoryCountByUser = (end_user_id: string) => {

View File

@@ -15,7 +15,7 @@ import { useParams } from 'react-router-dom'
import ReactEcharts from 'echarts-for-react';
import { Space } from 'antd'
import { getHotMemoryTagsByUser } from '@/api/memory';
import { getInterestDistributionByUser } from '@/api/memory';
import Empty from '@/components/Empty';
import Loading from '@/components/Empty/Loading';
import RbCard from '@/components/RbCard/Card';
@@ -38,7 +38,7 @@ const InterestDistribution: FC = () => {
/** Fetch interest distribution data */
const getData = () => {
setLoading(true)
getHotMemoryTagsByUser(id as string).then(res => {
getInterestDistributionByUser(id as string).then(res => {
const response = res as { name: string; frequency: number }[]
setData(response.map(item => ({
...item,