Skip to content

Commit

Permalink
fix visibility of private collection in user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed Mar 27, 2024
1 parent a7d55f6 commit ab63cc8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/(pages)/anime/[slug]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export async function generateMetadata(
const title =
(anime.title_ua || anime.title_en || anime.title_ja) +
(startDate ? ` (${startDate})` : '');
let synopsis: string | undefined = await parseTextFromMarkDown(
let synopsis: string | undefined = parseTextFromMarkDown(
anime.synopsis_ua || anime.synopsis_en,
);

Expand Down
3 changes: 3 additions & 0 deletions services/api/collections/getCollections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type Request = {
content_type?: string;
author?: string;
sort: 'system_ranking' | 'created';
only_public?: boolean;
page?: number;
size?: number;
};
Expand All @@ -17,6 +18,7 @@ export default async function req({
size = 15,
content_type,
author,
only_public,
sort,
}: Request): Promise<Response> {
return fetchRequest<Response>({
Expand All @@ -26,6 +28,7 @@ export default async function req({
content_type,
author,
sort: [`${sort}:desc`],
only_public,
},
auth,
page,
Expand Down
3 changes: 2 additions & 1 deletion services/hooks/user/useUserCollections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const useUserCollections = ({ username }: { username: string }) => {
page: pageParam,
auth,
sort: 'created',
}),
only_public: false
}),
});
};

Expand Down

0 comments on commit ab63cc8

Please sign in to comment.