feat(web): change interest distribution api
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user