diff --git a/src/routes/[username]/+page.server.ts b/src/routes/[username]/+page.server.ts index 31e797f6..dfe1d56a 100644 --- a/src/routes/[username]/+page.server.ts +++ b/src/routes/[username]/+page.server.ts @@ -12,11 +12,11 @@ export const load = (async ({ params }: { params: any }) => { lazy: { channels: get(`channels/user?userId=${profile._id}&skip=${0}&limit=${10}`), totalPageViews: get(`stats/views/total-views?viewType=user&viewId=${profile._id}`), - totalChannelViews: get(`stats/views/total-views?viewType=channel&userId=${profile._id}`), + totalChannelViews: get(`stats/views/total-views?viewType=channel&host=${profile._id}`), totalChannelViews4Weeks: get( - `stats/views/total-views/4-weeks?viewType=channel&userId=${profile._id}` + `stats/views/total-views/4-weeks?viewType=channel&host=${profile._id}` ), - viewsMonthlyIncr: get(`stats/views/monthly-increase?viewType=channel&userId=${profile._id}`), + viewsMonthlyIncr: get(`stats/views/monthly-increase?viewType=channel&host=${profile._id}`), highestAndCurrentStreak: get(`stats/stream/streak?userId=${profile._id}`), streakMonthlyIncr: get(`stats/stream/streak/monthly-increase?userId=${profile._id}`), totalMins: get(`stats/stream/total-mins?userId=${profile._id}`), diff --git a/src/routes/channel/[channelId]/+page.svelte b/src/routes/channel/[channelId]/+page.svelte index aaaf0ee3..3e04a320 100644 --- a/src/routes/channel/[channelId]/+page.svelte +++ b/src/routes/channel/[channelId]/+page.svelte @@ -63,7 +63,8 @@ type: 'view', userId: $page.data.user?.userId, viewType: 'channel', - viewId: channel?._id + viewId: channel?._id, + host: channel?.user }, { userId: $page.data.user?.userId,