Skip to content

Commit

Permalink
fix: move user history to new endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed Jun 12, 2024
1 parent 617395e commit c323596
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/(pages)/(user)/u/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import History from '@/features/users/user-profile/user-history/user-history.com
import Statistics from '@/features/users/user-profile/user-statistics/user-statistics.component';

import getFavouriteList from '@/services/api/favourite/getFavouriteList';
import getUserHistory from '@/services/api/history/getUserHistory';
import getUserActivity from '@/services/api/user/getUserActivity';
import getUserHistory from '@/services/api/user/getUserHistory';
import getQueryClient from '@/utils/get-query-client';

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion features/users/user-history/history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Card from '@/components/ui/card';
import NotFound from '@/components/ui/not-found';
import Stack from '@/components/ui/stack';

import useUserHistory from '@/services/hooks/user/use-user-history';
import useUserHistory from '@/services/hooks/history/use-user-history';

interface Props {
className?: string;
Expand Down
2 changes: 1 addition & 1 deletion features/users/user-profile/user-history/history-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useParams } from 'next/navigation';
import HistoryItem from '@/components/history-item';
import LoadMoreButton from '@/components/load-more-button';

import useUserHistory from '@/services/hooks/user/use-user-history';
import useUserHistory from '@/services/hooks/history/use-user-history';

interface Props {
className?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Button } from '@/components/ui/button';
import Header from '@/components/ui/header';
import NotFound from '@/components/ui/not-found';

import useUserHistory from '@/services/hooks/user/use-user-history';
import useUserHistory from '@/services/hooks/history/use-user-history';
import { useModalContext } from '@/services/providers/modal-provider';
import { cn } from '@/utils/utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
BaseFetchRequestProps,
FetchRequestProps,
fetchRequest,
} from '@/services/api/fetchRequest';

Expand All @@ -18,7 +17,7 @@ export default async function req({
}: BaseFetchRequestProps<Params>): Promise<Response> {
return fetchRequest<Response>({
...props,
path: `/user/${params?.username}/history`,
path: `/history/user/${params?.username}`,
method: 'get',
page: page,
size: size,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import getUserHistory, { Params } from '@/services/api/user/getUserHistory';
import getUserHistory, { Params } from '@/services/api/history/getUserHistory';
import useInfiniteList from '@/services/hooks/use-infinite-list';
import { useSettingsContext } from '@/services/providers/settings-provider';
import { convertAnime } from '@/utils/anime-adapter';
Expand Down

0 comments on commit c323596

Please sign in to comment.